C# Class SharpLogger.LogAccess

Exibir arquivo Open project: repinvv/SharpLogger

Public Methods

Method Description
FilterAddID ( int id ) : void

Adds an ID to ID filter. Used to only log messages for specified ID, user ID for example.

FilterClear ( ) : void

Clears ID filter. All the entries will be logged.

FilterRemoveID ( int id ) : void

Removes ID from ID filter, this ID is no longer gets monitored. As soon as ID filter becomes empty, all the entries will be logged.

GetLogger ( string category ) : Logger

Gets a logger for specified category. For example module name or a class name.

GetNullLogger ( ) : Logger

Self explanatory. Gets a null logger that will not send any logs.

Init ( ) : void

Initiates logging.

Init ( IOptions options ) : void
SetDefault ( int level ) : void

Sets default log level for all new loggers.

SetLevel ( string category, int level ) : void

Sets a log level for specified category. All the levels below it will be enabled. All the levels above - disabled. For example, setting Warning level will also enable Error and Fatal levels. Info, Event, Debug and Detailed messages will not get into the output.

SetLevelForAll ( int level ) : void

Sets a log level for all categories.

SetOneLevel ( string category, int level, bool value ) : void

Sets a single level for a single category enabled or disabled.

SetOneLevelForAll ( int level, bool value ) : void

Sets a single level for all categories enabled or disabled.

ShutDown ( ) : void

Shuts down a thread used by the logger.

Private Methods

Method Description
InitBody ( ) : void
LogAccess ( ) : SharpLogger.Loggers

Method Details

FilterAddID() public static method

Adds an ID to ID filter. Used to only log messages for specified ID, user ID for example.
public static FilterAddID ( int id ) : void
id int
return void

FilterClear() public static method

Clears ID filter. All the entries will be logged.
public static FilterClear ( ) : void
return void

FilterRemoveID() public static method

Removes ID from ID filter, this ID is no longer gets monitored. As soon as ID filter becomes empty, all the entries will be logged.
public static FilterRemoveID ( int id ) : void
id int
return void

GetLogger() public static method

Gets a logger for specified category. For example module name or a class name.
public static GetLogger ( string category ) : Logger
category string
return Logger

GetNullLogger() public static method

Self explanatory. Gets a null logger that will not send any logs.
public static GetNullLogger ( ) : Logger
return Logger

Init() public static method

Initiates logging.
public static Init ( ) : void
return void

Init() public static method

public static Init ( IOptions options ) : void
options IOptions
return void

SetDefault() public static method

Sets default log level for all new loggers.
public static SetDefault ( int level ) : void
level int
return void

SetLevel() public static method

Sets a log level for specified category. All the levels below it will be enabled. All the levels above - disabled. For example, setting Warning level will also enable Error and Fatal levels. Info, Event, Debug and Detailed messages will not get into the output.
public static SetLevel ( string category, int level ) : void
category string
level int
return void

SetLevelForAll() public static method

Sets a log level for all categories.
public static SetLevelForAll ( int level ) : void
level int
return void

SetOneLevel() public static method

Sets a single level for a single category enabled or disabled.
public static SetOneLevel ( string category, int level, bool value ) : void
category string
level int
value bool
return void

SetOneLevelForAll() public static method

Sets a single level for all categories enabled or disabled.
public static SetOneLevelForAll ( int level, bool value ) : void
level int
value bool
return void

ShutDown() public static method

Shuts down a thread used by the logger.
public static ShutDown ( ) : void
return void