aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Logging/LogItemBase.cs
blob: 85451488a805699121701218cce097bd72020f50 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Tango.Logging
{
    /// <summary>
    /// Represents a base class for log items.
    /// </summary>
    public abstract class LogItemBase
    {
        /// <summary>
        /// Gets or sets the caller method adding the exception.
        /// </summary>
        public String CallerMethodName { get; set; }

        /// <summary>
        /// Gets or sets the caller file.
        /// </summary>
        public String CallerFile { get; set; }

        /// <summary>
        /// Gets or sets the caller line number.
        /// </summary>
        public int CallerLineNumber { get; set; }

        /// <summary>
        /// Gets or sets the DateTime for the log.
        /// </summary>
        public DateTime TimeStamp { get; set; }

        /// <summary>
        /// Gets or sets the log category.
        /// </summary>
        public LogCategory Category { get; set; }

        /// <summary>
        /// Gets the log message.
        /// </summary>
        /// <returns></returns>
        public abstract String GetMessage();

        /// <summary>
        /// Returns a formatted string of the log item.
        /// </summary>
        public abstract override String ToString();
    }
}