2

I want to implement logger (say log4net) into ASP.Net 5 and MVC 6 Web application, right now log4net doesn't supported for DNX core, therefore I want it to implement in DNX 4.5 (full .net framework) and later on switch into DNX core when log4net is available for DNX core. Does it feasible ? or is there any other option to implement logger which have file and database logging and should also has DNX 5.0 core support.

1
  • Change the title to use proper terms. DNX is not a suitable name for discussion. Commented Feb 5, 2016 at 10:17

1 Answer 1

1

You should try Serilog framework. It uses semantic logging and have many adapters (sinks). It also got pre-release version with dnxCore support

Sign up to request clarification or add additional context in comments.

5 Comments

But Serilog does not has sink for database, I need both file and database to store logs.
I saw that and found Serilog has sql server support but it only for full framework which dnx 4.5 not for DNX Core. If you know about this plz let me know.. Thanks
You are right currently you can use it with seq. Have a look at stackoverflow.com/q/34379650/2483016
Sinks are also very (very!) easy to write - using WriteTo.Sink() and an implementation of ILogEventSink might be a workaround while SQL Server support is ported to *Core.
now you have also serilog sql sink for .net core here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.