コード例 #1
0
        /// <summary>
        /// 写调试日志
        /// </summary>
        /// <param name="message">消息</param>
        /// <param name="source">来源</param>
        /// <param name="extraData">附加数据</param>
        public static void Debug(string message, MethodBase source = null, string extraData = "")
        {
            if ((_target & LogTarget.Console) == LogTarget.Console)
            {
                LogConsole.Debug(message, source, extraData);
            }

            if ((_target & LogTarget.Debug) == LogTarget.Debug)
            {
                LogDebug.Debug(message, source, extraData);
            }

            if ((_target & LogTarget.Trace) == LogTarget.Trace)
            {
                LogTrace.Debug(message, source, extraData);
            }
        }
コード例 #2
0
        /// <summary>
        /// 写致命日志
        /// </summary>
        /// <param name="exception">异常</param>
        /// <param name="source">来源</param>
        /// <param name="extraData">附加数据</param>
        public static void Fatal(Exception exception, MethodBase source = null, string extraData = "")
        {
            if ((_target & LogTarget.Console) == LogTarget.Console)
            {
                LogConsole.Fatal(exception, source, extraData);
            }

            if ((_target & LogTarget.Debug) == LogTarget.Debug)
            {
                LogDebug.Fatal(exception, source, extraData);
            }

            if ((_target & LogTarget.Trace) == LogTarget.Trace)
            {
                LogTrace.Fatal(exception, source, extraData);
            }
        }