Embedio: Turning off logging.

Created on 19 Jan 2018  路  8Comments  路  Source: unosquare/embedio

Hello,

Sorry for bothering you but is there a way to disable logging completely? I might be missing something.
(this :)
11:18:49.520 INF >> [WebServer] Web server prefix 'http://localhost:4243/' added. 11:18:49.527 INF >> [WebServer] Finished Loading Web Server. 11:18:49.552 INF >> [WebServer] Started HTTP Listener

Have a nice day.

help wanted

Most helpful comment

Hi Dewyer,

EmbedIO is using SWAN's Terminal to output messages, you can disable all message, or change the verbosity, by changing the Terminal setting as in the following line:

Terminal.Settings.DisplayLoggingMessageType = LogMessageType.None;

I'll update the Wiki to include this information.

All 8 comments

Hi Dewyer,

EmbedIO is using SWAN's Terminal to output messages, you can disable all message, or change the verbosity, by changing the Terminal setting as in the following line:

Terminal.Settings.DisplayLoggingMessageType = LogMessageType.None;

I'll update the Wiki to include this information.

Hello geoperez

Thank you very much :D That solved my problem.
Keep on the good work.

But how it is possible to redirect messages to custom logger?
And how to separate log messages from different WebServers?

Yes, it's possible to redirect the output using the following event:

https://unosquare.github.io/swan/api/Unosquare.Swan.Terminal.html#Unosquare_Swan_Terminal_OnLogMessageDisplaying

Regarding separate log messages, there is no way right now, but you can open a new ticket requesting the feature.

Hi. How to do this for latest Embedio?

You can check the Wiki: https://github.com/unosquare/embedio/wiki/Cookbook#how-to-turn-off-logging

Thanks, but it also hides Warnings and Errors? How to save Errors?
It would be perfect to redirect Errors to my own Logger.

You can configure the threshold of the ConsoleLogger, or register your own Logger. You just need to implement ILogger interface (https://unosquare.github.io/swan/api/Swan.Logging.ILogger.html)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rocketraman picture rocketraman  路  7Comments

Dewyer picture Dewyer  路  7Comments

madnik7 picture madnik7  路  5Comments

NoTimeForHero picture NoTimeForHero  路  5Comments

Genteure picture Genteure  路  5Comments