利用log类打印日志

private static readonly log4net.ILog log = log4net.LogManager.GetLogger("smartFactory.Common");

/// <summary>
/// Log a message with the log4net.Core.Level.Debug level.
/// </summary>
/// <param name="tag">The tag of log.</param>
/// <param name="message">The message to log.</param>
public static void d(string tag, string message)
{
if (log.IsDebugEnabled)
{
log.Debug(tag + ":" + message);
}
}

posted @ 2018-08-01 17:12  码农阿宽  阅读(178)  评论(0编辑  收藏  举报