Class holfing a logger thread
More...
|
void | StartLogging (string folder, string fileName) |
| Starts the logging. More...
|
|
void | LogException (Exception exception, [CallerMemberName] string memberName="", [CallerFilePath] string filePath="", [CallerLineNumber] int lineNumber=0) |
| Logs the exception. More...
|
|
void | LogWarning (string message, [CallerMemberName] string memberName="", [CallerFilePath] string filePath="", [CallerLineNumber] int lineNumber=0) |
| Logs the warning. More...
|
|
void | LogInfo (string message, [CallerMemberName] string memberName="", [CallerFilePath] string filePath="", [CallerLineNumber] int lineNumber=0) |
| Logs the information. More...
|
|
void | Dispose () |
| Releases unmanaged and - optionally - managed resources. More...
|
|
Class holfing a logger thread
Definition at line 10 of file Logger.cs.
void Logging.Logger.Dispose |
( |
| ) |
|
Releases unmanaged and - optionally - managed resources.
Definition at line 68 of file Logger.cs.
70 this.CloseLoggerTask();
void Logging.Logger.LogException |
( |
Exception |
exception, |
|
|
[CallerMemberName] string |
memberName = "" , |
|
|
[CallerFilePath] string |
filePath = "" , |
|
|
[CallerLineNumber] int |
lineNumber = 0 |
|
) |
| |
Logs the exception.
- Parameters
-
exception | The exception. |
memberName | Name of the member. |
filePath | The file path. |
lineNumber | The line number. |
Definition at line 36 of file Logger.cs.
38 this.loggerTask?.
EnqueueObject(
new LoggerInfo(DateTime.Now,
Severity.Exception, exception + exception.StackTrace, memberName, filePath, lineNumber));
Severity
Severity of a log event
void EnqueueObject(LoggerInfo loggerInfo)
Enqueues the object.
void Logging.Logger.LogInfo |
( |
string |
message, |
|
|
[CallerMemberName] string |
memberName = "" , |
|
|
[CallerFilePath] string |
filePath = "" , |
|
|
[CallerLineNumber] int |
lineNumber = 0 |
|
) |
| |
Logs the information.
- Parameters
-
message | The message. |
memberName | Name of the member. |
filePath | The file path. |
lineNumber | The line number. |
Definition at line 60 of file Logger.cs.
62 this.loggerTask?.
EnqueueObject(
new LoggerInfo(DateTime.Now,
Severity.Info, message, memberName, filePath, lineNumber));
Severity
Severity of a log event
void EnqueueObject(LoggerInfo loggerInfo)
Enqueues the object.
void Logging.Logger.LogWarning |
( |
string |
message, |
|
|
[CallerMemberName] string |
memberName = "" , |
|
|
[CallerFilePath] string |
filePath = "" , |
|
|
[CallerLineNumber] int |
lineNumber = 0 |
|
) |
| |
Logs the warning.
- Parameters
-
message | The message. |
memberName | Name of the member. |
filePath | The file path. |
lineNumber | The line number. |
Definition at line 48 of file Logger.cs.
50 this.loggerTask?.
EnqueueObject(
new LoggerInfo(DateTime.Now,
Severity.Warning, message, memberName, filePath, lineNumber));
Severity
Severity of a log event
void EnqueueObject(LoggerInfo loggerInfo)
Enqueues the object.
void Logging.Logger.StartLogging |
( |
string |
folder, |
|
|
string |
fileName |
|
) |
| |
Starts the logging.
- Parameters
-
folder | The folder. |
fileName | Name of the file. |
Definition at line 20 of file Logger.cs.
22 if (this.loggerTask != null)
23 this.CloseLoggerTask();
24 this.loggerTask =
new LoggerTask(folder, fileName);
25 this.workerThread =
new Thread(this.loggerTask.
DoWork) {IsBackground =
true};
26 this.workerThread.Start();
void DoWork()
Does the work. Events to log are filled in a concurrent queue and then read here in serial order...
The documentation for this class was generated from the following file:
- C:/Entwicklung/Simple3DScan/Simple3DScan/Logging/Logger.cs