How to log to database using the built-in Asp.Net core logging (Microsoft.Extensions.Logging)? -


i have following code set logging database using nlog. use alpha version of nlog.extension.logging. possible let built-in log framework log database don't need use nlog?

public void configure(iapplicationbuilder app, ihostingenvironment env, iloggerfactory loggerfactory) {     loggerfactory.addconsole(configuration.getsection("logging"));     loggerfactory.adddebug();     loggerfactory.addnlog();     env.configurenlog("nlog.config");      app.useapplicationinsightsrequesttelemetry();      app.useapplicationinsightsexceptiontelemetry();      app.usemvc(); } 

there project on github flexible , available ef core:

znetcs.aspnetcore.logging.entityframeworkcore

it prepared use in asp net core application, not contain references prevents use in plain .net core application. there possibilty extend base log class.


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -