| | |
| | | using System;
|
| | | using System.Diagnostics;
|
| | | using System.Diagnostics;
|
| | |
|
| | | namespace CCSTrace.CCS
|
| | | {
|
| | | public class SEventLog |
| | | public class SEventLog
|
| | | {
|
| | | static string sSource = "CCSTrace";
|
| | | static string sLog = "Application";
|
| | | private const string SSource = "CCSTrace";
|
| | | private const string SLog = "Application";
|
| | |
|
| | | public SEventLog()
|
| | | {
|
| | |
| | |
|
| | | public void Debug(object message)
|
| | | {
|
| | | if (!EventLog.SourceExists(sSource))
|
| | | EventLog.CreateEventSource(sSource, sLog);
|
| | | if (!EventLog.SourceExists(SSource))
|
| | | EventLog.CreateEventSource(SSource, SLog);
|
| | |
|
| | | //EventLog.WriteEntry(sSource, message.ToString());
|
| | | EventLog.WriteEntry(sSource, message.ToString(), EventLogEntryType.Information, 001);
|
| | | EventLog.WriteEntry(SSource, message.ToString(), EventLogEntryType.Information, 001);
|
| | | }
|
| | |
|
| | | public void Error(object message)
|
| | |
| | |
|
| | | public void Fatal(object message)
|
| | | {
|
| | | if (!EventLog.SourceExists(sSource))
|
| | | EventLog.CreateEventSource(sSource, sLog);
|
| | | if (!EventLog.SourceExists(SSource))
|
| | | EventLog.CreateEventSource(SSource, SLog);
|
| | |
|
| | | //EventLog.WriteEntry(sSource, message.ToString());
|
| | | EventLog.WriteEntry(sSource, message.ToString(), EventLogEntryType.FailureAudit, 001);
|
| | | EventLog.WriteEntry(SSource, message.ToString(), EventLogEntryType.FailureAudit, 001);
|
| | | }
|
| | |
|
| | | public void Info(object message)
|
| | |
| | |
|
| | | public void Warn(object message)
|
| | | {
|
| | | if (!EventLog.SourceExists(sSource))
|
| | | EventLog.CreateEventSource(sSource, sLog);
|
| | | if (!EventLog.SourceExists(SSource))
|
| | | EventLog.CreateEventSource(SSource, SLog);
|
| | |
|
| | | //EventLog.WriteEntry(sSource, message.ToString());
|
| | | EventLog.WriteEntry(sSource, message.ToString(), EventLogEntryType.Warning, 001);
|
| | | EventLog.WriteEntry(SSource, message.ToString(), EventLogEntryType.Warning, 001);
|
| | | }
|
| | |
|
| | | public void Close()
|
| | | {
|
| | | }
|
| | | }
|
| | | }
|
| | | } |