Exemplo n.º 1
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddControllers();

            var _log = LogExtension.GetGlobalLog(BKYL.Log.LogFactory.LogEnum.web);

            LogHelp.log = _log;
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            //获取全局日志对象 该方法全局只需要获取一次即可
            _log = LogExtension.GetGlobalLog(BKYL.Log.LogFactory.LogEnum.console);

            #region 注释

            _log.Error("这个出错了", new Exception("我是一个错误信息"), true, true);
            _log.Error("这个出错了", new Exception("我是一个错误信息22222"), true, true);
            #endregion

            Console.ReadLine();
        }