You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
869 B
C#
30 lines
869 B
C#
using Microsoft.Practices.EnterpriseLibrary.Logging;
|
|
using System.Diagnostics;
|
|
|
|
namespace HcUtility.Logging
|
|
{
|
|
public class LoggingUtil
|
|
{
|
|
public static void Write(string message, string category, int priority, TraceEventType traceeventtype)
|
|
{
|
|
LogEntry log = new LogEntry();
|
|
log.EventId = 100;
|
|
log.Message = message;
|
|
log.Categories.Add(category);
|
|
log.Severity = traceeventtype;
|
|
log.Priority = priority;
|
|
Logger.Write(log);
|
|
}
|
|
|
|
public static void Write(string message, string category, int priority)
|
|
{
|
|
LogEntry log = new LogEntry();
|
|
log.EventId = 100;
|
|
log.Message = message;
|
|
log.Categories.Add(category);
|
|
log.Priority = priority;
|
|
Logger.Write(log);
|
|
}
|
|
}
|
|
}
|