C# Class Sharpcraft.Logging.LogManager

Provides centralized logging utilities for Sharpcraft.
Using the default config files, the log files will be contained withing the "log" subfolder. The format of the log file names will be "Sharpcraft_yyyy-mm-dd.log".
显示文件 Open project: SijmenSchoon/Sharpcraft

Public Methods

Method Description
GetLogger ( object sender ) : log4net.ILog

Get an ILog to utilize logging.

By using this method to get a logger instead of LogManager.GetLogger, you avoid the need to call XmlConfigurator.Configure in every class you want to log from.

LoadConfig ( bool debug = false ) : void

Load the logger config.

Method Details

GetLogger() public static method

Get an ILog to utilize logging.
By using this method to get a logger instead of LogManager.GetLogger, you avoid the need to call XmlConfigurator.Configure in every class you want to log from.
public static GetLogger ( object sender ) : log4net.ILog
sender object Object or Type reference for the object requiring logger.
return log4net.ILog

LoadConfig() public static method

Load the logger config.
public static LoadConfig ( bool debug = false ) : void
debug bool true to load debug config, false otherwise. /// Defaults to false.
return void