blob: de526f954d9c8abc40baf0c4e5995d1596f43884 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tango.Logging
{
/// <summary>
/// Represents an exception log item.
/// </summary>
public class ExceptionLogItem : LogItemBase
{
/// <summary>
/// Gets or sets the log item exception.
/// </summary>
public Exception InnerException { get; set; }
/// <summary>
/// Gets or sets the error description.
/// </summary>
public String Description { get; set; }
/// <summary>
/// Returns a formatted string of the log item.
/// </summary>
public override string ToString()
{
return String.Format("[{0}] [{1}] [{2}] [Line {3}]: {4}{5}", TimeStamp.ToString("HH:mm:ss.ff"), Path.GetFileNameWithoutExtension(CallerFile), CallerMethodName, CallerLineNumber, Description, Environment.NewLine + InnerException.Message);
}
}
}
|