You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Stefan Hutter 977d1b0c9f
Projektdateien hinzufügen.
1 year ago
..
lib Projektdateien hinzufügen. 1 year ago
.signature.p7s Projektdateien hinzufügen. 1 year ago
N.png Projektdateien hinzufügen. 1 year ago
NLog.Database.5.3.2.nupkg Projektdateien hinzufügen. 1 year ago
README.md Projektdateien hinzufügen. 1 year ago

README.md

NLog Database Target

NLog Database Target can write to any database that has ADO.NET Database Provider. Ex. MS-SQL, MySQL, SqLite, Oracle, etc.

Make sure to also install the nuget-package for the wanted Database Provider, and configure the DbProvider for the Database Target.

If having trouble with output, then check NLog InternalLogger for clues. See also Troubleshooting NLog

See the NLog Wiki for available options and examples.

Register Extension

NLog will only recognize type-alias database when loading from NLog.config-file, if having added extension to NLog.config-file:

<extensions>
    <add assembly="NLog.Database"/>
</extensions>

Alternative register from code using fluent configuration API:

LogManager.Setup().SetupExtensions(ext => {
   ext.RegisterTarget<NLog.Targets.DatabaseTarget>();
});