Class Logger
Helps with logging by creating separate log files if running concurrently
Inheritance
System.Object
Logger
Implements
System.IDisposable
Namespace: BitAddict.Aras
Assembly: BitAddict.Aras.dll
Syntax
public class Logger : IDisposable
Constructors
Logger(String)
Create logger instance.
Declaration
public Logger(string baseName)
Parameters
Type | Name | Description |
---|---|---|
System.String | baseName |
Properties
AlwaysIncrementLogNumber
If log file number should be incremented for each new logger created. Used in unit-testing only.
Declaration
public static bool AlwaysIncrementLogNumber { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
EnableConsoleLogging
If log messages shoulkd be written to the console in addition to file
Declaration
public static bool EnableConsoleLogging { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
EnableDebugLogging
If log messages are output to attached debugger
Declaration
public static bool EnableDebugLogging { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
LogFile
Path to the log file
Declaration
public string LogFile { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
Dispose()
Mark object as disposed, will perform Dispose once writes are completed
Declaration
public void Dispose()
Log(String)
Log a message to log file et.al. Safe to use concurrently.
Declaration
public void Log(string msg)
Parameters
Type | Name | Description |
---|---|---|
System.String | msg |
Exceptions
Type | Condition |
---|---|
System.ObjectDisposedException |
Implements
System.IDisposable