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.4 0 09/12/2024
5.3.3 0 08/12/2024
5.3.2 9 06/02/2024
5.3.1 7 04/27/2024
5.2.8 7 04/27/2024
5.2.7 5 05/22/2024
5.2.6 5 05/22/2024
5.2.5 0 10/15/2023
5.2.4 7 05/22/2024
5.2.3 0 08/05/2023
5.2.2 6 05/22/2024
5.2.1 8 07/04/2023
5.2.0 4 06/17/2023
5.1.5 6 06/17/2023
5.1.4 7 06/17/2023
5.1.3 42 04/13/2023
5.1.2 5 06/17/2023
5.1.1 0 12/29/2022
5.1.0 0 11/27/2022
5.0.5 4 05/22/2024
5.0.4 6 06/17/2023
5.0.3 0 08/31/2022
5.0.2 10 08/25/2022
5.0.1 6 07/25/2022
5.0.0 8 05/22/2024