using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NLog;
namespace Bowin.Common.Log
{
public enum LogType
{
CommmLog, //通用日志
ServiceLog
}
public class LogHelper
{
///
/// 直接使用这个的话,类型就是Info(信息)
///
///
///
public static void WriteLog(LogType logType, string message)
{
//不要重载
LogManager.GetLogger(logType.ToString()).Log(LogLevel.Info, message.Replace("'", "''"));
}
public static void WriteErrorLog(LogType logType, string message)
{
//不要重载
LogManager.GetLogger(logType.ToString()).Log(LogLevel.Error, message.Replace("'", "''"));
}
public static void WriteLog(LogType logType, string message, LogLevel logLevel)
{
//不要重载
LogManager.GetLogger(logType.ToString()).Log(logLevel, message.Replace("'", "''"));
}
public static void WriteDebugLog(LogType logType, string message)
{
//不要重载
LogManager.GetLogger(logType.ToString()).Log(LogLevel.Debug, message.Replace("'", "''"));
}
}
}