Mercurial > repos > IBBoard
view Logging/LogItem.cs @ 0:961030992bd2
Initial commit of IBBoard libraries
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Fri, 19 Dec 2008 11:13:48 +0000 |
parents | |
children | 0352fa33ee8f |
line wrap: on
line source
using System; namespace IBBoard.Logging { public class LogItem { private LogLevel logLevel; private string logMessage, stacktrace; private DateTime occurance; public LogItem(LogLevel level, string message) : this(level, message, "") { } public LogItem(LogLevel level, string message, string stack) { logLevel = level; logMessage = message; occurance = DateTime.Now; stacktrace = stack; } public LogLevel Level { get { return logLevel; } } public string Message { get { return logMessage; } } public DateTime OccuranceTime { get { return occurance; } } public override string ToString() { return OccuranceTime.ToString()+" ("+Level+"): "+Message; } public string StackTrace { get { return stacktrace; } } } }