利用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);
}
}

猜你喜欢

转载自www.cnblogs.com/wosshiakuan/p/9402405.html
今日推荐