Simply3DScan
LoggerInfo.cs
Go to the documentation of this file.
1 using System;
2 
3 namespace Logging
4 {
8  public class LoggerInfo
9  {
10  private readonly Severity severity;
11  private readonly string message;
12  private readonly string memberName;
13  private readonly string filePath;
14  private readonly int lineNumber;
15  private DateTime time;
16 
26  public LoggerInfo(DateTime time, Severity severity, string message, string memberName, string filePath, int lineNumber)
27  {
28  this.time = time;
29  this.severity = severity;
30  this.message = message;
31  this.memberName = memberName;
32  this.filePath = filePath;
33  this.lineNumber = lineNumber;
34  }
35 
42  public override string ToString()
43  {
44  return String.Format("{0}\t{1}\t{2}({3}:{4})\t{5}\t\t{6}{5}",
45  this.time.ToString("yyyy.MM.dd HH:mm:ss.fff"), this.severity, this.memberName, this.filePath, this.lineNumber, Environment.NewLine,
46  this.message);
47  }
48  }
49 }
Severity
Severity of a log event
Definition: Severity.cs:6
LoggerInfo(DateTime time, Severity severity, string message, string memberName, string filePath, int lineNumber)
Initializes a new instance of the LoggerInfo class.
Definition: LoggerInfo.cs:26
Class for holding log information
Definition: LoggerInfo.cs:8
Definition: Logger.cs:5
override string ToString()
Returns a System.String that represents this instance.
Definition: LoggerInfo.cs:42