示例#1
0
        protected override void DoAppend(LogEvent logEvent)
        {
            var file = new FileInfo(FileName);

            if (!file.Exists)
                WriteHeader();

            Write(Parse(logEvent));
        }
示例#2
0
 protected override string Parse(LogEvent logEvent)
 {
     return string.Format("<event filename=\"{0}\" author=\"{1}\" date=\"{2}\" action=\"{3}\" />",
         logEvent.FileName,
         logEvent.User,
         GetTime(logEvent.Date).ToString(),
         logEvent.Action
     );
 }
示例#3
0
 protected virtual string Parse(LogEvent logEvent)
 {
     return string.Format("{1}{0}{2}{0}{3}{0}{4}",
         delimiter,
         logEvent.Date,
         logEvent.User,
         logEvent.Action,
         logEvent.FileName
     );
 }
示例#4
0
 protected override string Parse(LogEvent logEvent)
 {
     return string.Format("{1}{0}{2}{0}{3}{0}{4}",
         delimiter,
         GetTime(logEvent.Date).ToString(),
         logEvent.User,
         logEvent.Action,
         logEvent.FileName
     );
 }
示例#5
0
 protected override string Parse(LogEvent logEvent)
 {
     return string.Format("{1}{0}{2}{0}{3}{0}{4}{0}{5}",
         delimiter,
         GetTime(logEvent.Date).ToString(),
         logEvent.User,
         logEvent.FileName,
         logEvent.Action,
         (logEvent is LogstalgiaEvent) ? (logEvent as LogstalgiaEvent).Size : "1"
     );
 }
示例#6
0
 protected abstract void DoAppend(LogEvent logEvent);
示例#7
0
 public void Append(LogEvent logEvent)
 {
     DoAppend(logEvent);
 }
示例#8
0
 protected override void DoAppend(LogEvent logEvent)
 {
     AddData(logEvent);
 }
示例#9
0
 protected abstract void AddData(LogEvent logEvent);