NLog.Database 5.3.2

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>();
});

No packages depend on NLog.Database.

Docs: https://github.com/nlog/NLog/wiki/Database-target

.NET Framework 3.5

.NET Standard 2.0

.NET Standard 1.5

.NET Standard 1.3

.NET Framework 4.6

.NET Framework 4.5

Version Downloads Last updated
5.3.2 8 06/02/2024
5.3.1 6 04/27/2024
5.2.8 6 04/27/2024
5.2.7 4 05/22/2024
5.2.6 4 05/22/2024
5.2.4 4 05/22/2024
5.2.2 6 05/22/2024
5.2.1 5 07/04/2023
5.2.0 4 06/17/2023
5.1.5 4 06/17/2023
5.1.4 5 06/17/2023
5.1.3 39 04/13/2023
5.1.2 5 06/17/2023
5.0.5 3 05/22/2024
5.0.4 5 06/17/2023
5.0.2 8 08/25/2022
5.0.1 6 07/25/2022
5.0.0 7 05/22/2024