LogUtil.cs
973 字节
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using log4net.Config;
using log4net;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace MemoryRead
{
public class LogUtil
{
public static ILog LOGGER;
static LogUtil()
{
XmlConfigurator.Configure(new FileInfo("log4net.config"));
LOGGER = LogManager.GetLogger("SmartScan");
}
public static void info(string str, Color color)
{
LOGGER.Info(str);
}
public static void info(string str)
{
LOGGER.Info(str);
}
public static void error(string str, Exception err)
{
LOGGER.Error(str, err);
}
public static void error(string str)
{
LOGGER.Error(str);
}
public static void debug(string str)
{
LOGGER.Debug(str);
}
}
}