Class FileLogger
A helper class to write into files the messages sent by the Terminal.
Inherited Members
Namespace: Swan.Logging
Syntax
public class FileLogger : TextLogger, ILogger, IDisposable
Constructors
FileLogger()
Initializes a new instance of the FileLogger class.
Declaration
public FileLogger()
FileLogger(String, Boolean)
Initializes a new instance of the FileLogger class.
Declaration
public FileLogger(string filePath, bool dailyFile)
Parameters
Type | Name | Description |
---|---|---|
String | filePath | The filePath. |
Boolean | dailyFile | if set to |
Properties
DailyFile
Gets a value indicating whether [daily file].
Declaration
public bool DailyFile { get; }
Property Value
Type | Description |
---|---|
Boolean |
|
FilePath
Gets the file path.
Declaration
public string FilePath { get; }
Property Value
Type | Description |
---|---|
String | The file path. |
LogLevel
Gets the log level.
Declaration
public LogLevel LogLevel { get; set; }
Property Value
Type | Description |
---|---|
LogLevel | The log level. |
Methods
Dispose()
Declaration
public void Dispose()
Dispose(Boolean)
Releases unmanaged and - optionally - managed resources.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
Boolean | disposing |
|
Log(LogMessageReceivedEventArgs)
Logs the specified log event.
Declaration
public void Log(LogMessageReceivedEventArgs logEvent)
Parameters
Type | Name | Description |
---|---|---|
LogMessageReceivedEventArgs | logEvent | The LogMessageReceivedEventArgs instance containing the event data. |