NLog version: 4.7.3
Platform: .NET Core 3
The Database target wiki page says about connectionStringName:
Not supported on NetCore as app.config has been replaced with appsettings.json
While this is true, connection strings are stored in the ConnectionStrings dictionary:
{
"ConnectionStrings": {
"SomeName": "Data Source=.;Initial Catalog=SomeDB;Persist Security Info=True;Integrated Security=true;"
}
}
Wouldn't it be possible to support this by retrieving them from the configuration?
Yes, you need nowadays: https://github.com/NLog/NLog/wiki/ConfigSetting-Layout-Renderer
@leonardder Does it answer your question? so the issue can be resolved/closed
Please add the requested info, so we could help you better! (This issue will be closed in 7 days)
Yes, that's certainly a solution for me. However, may be the docs about connectionStringName should point at this alternative to get a connection string by name?
Good idea. The Wiki is open for editing
Sent from my Sony Xperia
---- Leonard de Ruijter wrote ----
Yes, that's certainly a solution for me. However, may be the docs about connectionStringName should point at this alternative to get a connection string by name?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/NLog/NLog/issues/4075#issuecomment-671742207, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACXZ7HAZA6EAST2XA4QXOPLSADMGXANCNFSM4PXN2DMA.
Done.
Thanks!!