dff-solutions / shell.me

shell.me - your universal shell framework
MIT License
6 stars 1 forks source link

Add support for rich logging features #3

Closed cburgdorf closed 12 years ago

cburgdorf commented 12 years ago

Logging is a first class concern. We want to use shell.me to drop a lot of services that currently rely on the System.Diagnostics logging capabilities. While it is pretty easy to bootstrap System.Diagnostic in each command on your own, there are some things that we could help to make life easier:

  1. The configuration file should be optional. The traditional way to configure logging in System.Diagnostic is through the app.config file. For shell.me I would like to see that optional and default to a command line based approach instead!
  2. Something like: foo --log={ Listener :[{Name:File, Path:C:\test},{Name:Event}] }

Log would be a property on the command of type LoggingConfiguration so we would just write a custom TypeProvider to make that actually work. We still need to figure out what's the best approach to configure all the different possible TraceListeners for us then. We need to put more thought into that.

Here is how to configure Tracing programatically: http://msdn.microsoft.com/en-us/library/sk36c28t.aspx

cburgdorf commented 12 years ago

sent pull request, close as duplicate