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

A logging configuration editor is provided to define the configuration using a log.config XML file.  A new log.config file can be created or an existing log.config file can be edited.  Alternatively, runtime properties can be defined and then saved to a log.config file.  The log.config file must be placed in the same directory as the application in order to be 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
FileTarget fileTarget = new FileTarget("log.txt");
Log.Config.Targets.Add(fileTarget);

//Example saving to Log.Config XML file
Log.SaveConfigurationToXmlFile("log.config");