HostLogger / EventLog source ... in log application

274 views
Skip to first unread message

rreu...@hotmail.com

unread,
Mar 21, 2014, 5:26:20 PM3/21/14
to topshelf...@googlegroups.com
I've searched the documentation on logging, and found only how to replace the existing logging provider with either Log4Net, or other such logging frameworks.
 
I figured I would just start out with the native one, and get familiar with the logging and the event log source that TopShelf creates.
 
I have not found however any documentation (other than the source!) for HostLogger.  I know that I could take the time and read the source code, but I'm looking for best practises on using logging in a service application.  In particular I thought that TopShelf might have examples of why they incorporated the HostLogger, and the intended use of it.
 
Anybody seen or have such documentation?
 
Regards,
Richard

Travis Smith

unread,
Mar 22, 2014, 6:22:09 PM3/22/14
to topshelf...@googlegroups.com
There is no documentation on the builtin logger. Chris wrote it, and I haven't dug into it, but I thought it was really just to bridge Topshelf to other logging frameworks people like to use. Not really much of a useful logger on it's own. 

We just slap in log4net and use that in all our Topshelf services (around 25). We use it internally as well, so it's useful. It's set to ERROR level for us, because I don't care about the INFO/DEBUG messages from Topshelf. If you want specific Topshelf messages, you can set a logging level specifically for the Topshelf loggers though, it's pretty easy. 

-Travis


--
You received this message because you are subscribed to the Google Groups "topshelf-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topshelf-discu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kijana Woodard

unread,
Mar 23, 2014, 12:29:41 PM3/23/14
to topshelf...@googlegroups.com
I recently hooked up serilog to HostLogger. Worked great.

Chris Patterson

unread,
Mar 23, 2014, 2:14:44 PM3/23/14
to topshelf...@googlegroups.com
What's been said is right on, it's just an abstraction for internal code in Topshelf to be able to log to any of the common logging frameworks. I avoiding using Common.Logging because it's just a dependency that I neither need nor want, Topshelf currently has ZERO assembly references outside of the BCL. And will stay that way.

Reply all
Reply to author
Forward
0 new messages