#199 Les logs des repository sont desormais disponibles sur la console et dans grafana pour faciliter le debuggage.

This commit is contained in:
josephine.vetu
2026-04-06 19:40:43 +02:00
parent 425ab13617
commit 9430c54b82
3 changed files with 5 additions and 11 deletions

View File

@@ -81,16 +81,8 @@ public class ArtisteController : Controller
Biographie = model.Biographie,
};
try
{
this.artisteRepository.Add(artiste);
this.logger.LogInformation("Création d'un nouvel artiste: {Nom}", artiste.Nom);
}
catch (Exception ex)
{
this.logger.LogError(ex, "Erreur lors de la création de l'artiste: {Nom}", artiste.Nom);
return this.View(model);
}
this.artisteRepository.Add(artiste);
this.logger.LogInformation("Création d'un nouvel artiste: {Nom}", artiste.Nom);
// Renvoyer sur la page Index.
return this.RedirectToAction("Index");