NET Logging Library
app.config Configuration
Basic Tasks > app.config Configuration

A logging configuration editor is provided to define the configuration using an app.config file or web.config file. A new config file can be created or an existing config file can be edited.  Alternatively, runtime properties can be defined and then saved to a the app.config file or web.config file.  The congfiguration is automatically read at run time.  If there is logging configuration in a log.config file and a app.config/web.config then the log.config file takes priority.

//Clear all configuration
Log.ResetConfiguration();

//Add a new target, you can also define targets in an xml file, app.config, or web.config
FileTarget fileTarget = new FileTarget("fileLogger.txt");
Log.Config.Targets.Add(fileTarget);

//Example saving to app.config or web.config
Log.SaveConfigurationToAppConfigOrWebConfig();