星火微课系统客户端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

LogHelper.cs 576B

1 yıl önce
1234567891011121314151617181920
  1. using log4net.Config;
  2. using System;
  3. using System.IO;
  4. namespace Common.system
  5. {
  6. public class LogHelper
  7. {
  8. public static readonly log4net.ILog Loginfo = log4net.LogManager.GetLogger("loginfo");
  9. public static readonly log4net.ILog Logerror = log4net.LogManager.GetLogger("logerror");
  10. public static void InitLog4Net()
  11. {
  12. var logCfg = new FileInfo(AppDomain.CurrentDomain.BaseDirectory + "log4net.config");
  13. XmlConfigurator.ConfigureAndWatch(logCfg);
  14. Loginfo.Info("日志初始化");
  15. }
  16. }
  17. }