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.
42 lines
730 B
C#
42 lines
730 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.IO;
|
|
using NLog;
|
|
|
|
|
|
public class Logger
|
|
{
|
|
|
|
NLog.Logger logger = NLog.LogManager.GetLogger("loggerFile");
|
|
public Logger()
|
|
{
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// 信息记录
|
|
/// </summary>
|
|
/// <param name="msg"></param>
|
|
public void Log(string msg)
|
|
{
|
|
|
|
logger.Info(msg);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 错误记录
|
|
/// </summary>
|
|
/// <param name="msg"></param>
|
|
public void Error(string msg)
|
|
{
|
|
|
|
logger.Error(msg);
|
|
}
|
|
|
|
public void Close()
|
|
{
|
|
|
|
}
|
|
}
|