Nlog

De Banane Atomic
Version datée du 16 mars 2023 à 14:26 par Nicolas (discussion | contributions) (Page créée avec « Category:.NET Application = Links = * [https://nlog-project.org/download/ Getting started] = [https://github.com/NLog/NLog/wiki/Getting-started-with-.NET-Core-2---Console-application Console project] = == Nuget packages == * {{boxx|NLog.Extensions.Logging}} * {{boxx|Microsoft.Extensions.DependencyInjection}} * {{boxx|Microsoft.Extensions.Configuration.Json}} == Config file == <filebox fn='appsettings.json'> { "NLog": { "throwConfigExceptions": true,... »)
(diff) ← Version précédente | Voir la version actuelle (diff) | Version suivante → (diff)
Aller à la navigationAller à la recherche

Links

Console project

Nuget packages

  • NLog.Extensions.Logging
  • Microsoft.Extensions.DependencyInjection
  • Microsoft.Extensions.Configuration.Json

Config file

appsettings.json
{
  "NLog": {
    "throwConfigExceptions": true,
    "targets": {
      "async": true,
      "logconsole": {
        "type": "ColoredConsole"
      }
    },
    "rules": [
      {
        "logger": "*",
        "minLevel": "Info",
        "writeTo": "logconsole"
      }
    ]
  }
}