123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- #region --------------- Copyright Dresser Wayne Pignone -------------
- #endregion
- using System.Text;
- using System.Diagnostics.CodeAnalysis;
- namespace Wayne.Lib.Log
- {
-
-
-
- public class ErrorLogEntry : EventLogEntry
- {
- #region Fields
- private ErrorLogSeverity severity;
- #endregion
- #region Construction
-
-
-
-
-
-
- [SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "object")]
- public ErrorLogEntry(IIdentifiableEntity entity, ErrorLogSeverity severity, object logObject)
- : base(entity, logObject)
- {
- this.severity = severity;
- }
-
-
-
-
-
-
-
- [SuppressMessage("Microsoft.Naming", "CA1720:IdentifiersShouldNotContainTypeNames", MessageId = "object")]
- public ErrorLogEntry(IIdentifiableEntity entity, ErrorLogSeverity severity, object logObject, object category)
- : base(entity, logObject, category)
- {
- this.severity = severity;
- }
- #endregion
- #region Properties
-
-
-
- public const string LogPrefix = "***ERROR";
-
-
-
- public ErrorLogSeverity Severity
- {
- get { return severity; }
- }
- #endregion
- #region Methods: AppendTextToStringBuilder
-
-
-
-
-
-
-
-
- internal override void AppendToStringBuilder(LogWriter logWriter, StringBuilder output,
- int indentLength, ref bool isFirstLine, ref string indent)
- {
-
- output.Append(LogPrefix);
- output.Append(": ");
-
- StringLogObject.AppendObjectToStringBuilder(LogObject, output, logWriter, indentLength, ref isFirstLine, ref indent);
- }
- #endregion
- }
- }
|