#199 Les logs des repository sont desormais disponibles sur la console et dans grafana pour faciliter le debuggage.
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user