受欢迎的博客标签

How to Set Kestrel Console Output Color from ILogger in Asp .Net Core

Published

     The colors in ILogger implementation are decided based on the LogLevel that is being logged. The code for EF Core is in class called ConsoleLoggerProvider. Colors are hardcoded and depend on the LogLevel.    If you want to specify the colours yourself you would need to implement ILogger yourself. It's a pretty simple interface but as a reference this post gives you an example.  

  1.Set Kestrel Output Color from ILogger

https://stackoverflow.com/questions/48508072/set-kestrel-output-color-from-ilogger

2.How to add custom Console Output Color logging in ASP.NET Core

http://asp.net-hacker.rocks/2017/05/05/add-custom-logging-in-aspnetcore.html  .

3.

https://www.jianshu.com/p/e01af9fa77e8