示例#1
0
文件: Logger.cs 项目: Hunv/beRemote
        public static void Warning(string message, int EventId)
        {
            if (LogEventLog)
            {
                LoggerEventLog.Warning(message, EventId);
            }

            if (LogFileLog)
            {
                LoggerFileLog.Warning(message, EventId);
            }
        }
示例#2
0
文件: Logger.cs 项目: Hunv/beRemote
        public static void Info(string message)
        {
            if (LogEventLog)
            {
                LoggerEventLog.Info(message);
            }

            if (LogFileLog)
            {
                LoggerFileLog.Info(message);
            }
        }
示例#3
0
文件: Logger.cs 项目: Hunv/beRemote
        public static void Error(string message, int EventId)
        {
            if (LogEventLog)
            {
                LoggerEventLog.Error(message, EventId);
            }

            if (LogFileLog)
            {
                LoggerFileLog.Error(message, EventId);
            }
        }
示例#4
0
文件: Logger.cs 项目: Hunv/beRemote
        public static void Verbose(string message, int EventId)
        {
            if (LogEventLog)
            {
                LoggerEventLog.Verbose(message, EventId);
            }

            if (LogFileLog)
            {
                LoggerFileLog.Verbose(message, EventId);
            }
        }
示例#5
0
文件: Logger.cs 项目: Hunv/beRemote
        public static void Log(LogEntryType logEntryType, string message, Exception ea, string _loggerContext)
        {
            if (LogEventLog)
            {
                LoggerEventLog.Log(logEntryType, message, ea, _loggerContext);
            }

            if (LogFileLog)
            {
                LoggerFileLog.Log(logEntryType, message, ea, _loggerContext);
            }
        }
示例#6
0
文件: Logger.cs 项目: Hunv/beRemote
        public static void Log(LogEntryType logEntryType, string message)
        {
            if (LogEventLog)
            {
                LoggerEventLog.Log(logEntryType, message);
            }

            if (LogFileLog)
            {
                LoggerFileLog.Log(logEntryType, message);
            }
        }
示例#7
0
文件: Logger.cs 项目: Hunv/beRemote
        public static void Init(LogEntryType logEntryType, bool autoFlush, string logTextFile, bool logConsole, bool logEventLog, bool logFileLog)
        {
            LogEventLog = logEventLog;
            LogFileLog  = logFileLog;

            if (LogEventLog)
            {
                LoggerEventLog.Init(logEntryType);
            }

            if (LogFileLog)
            {
                TraceLevel tl = TraceLevel.Info;

                switch (logEntryType)
                {
                case LogEntryType.Verbose:
                case LogEntryType.Debug:
                    tl = TraceLevel.Verbose;
                    break;

                case LogEntryType.Info:
                    tl = TraceLevel.Info;
                    break;

                case LogEntryType.Warning:
                    tl = TraceLevel.Warning;
                    break;

                case LogEntryType.Exception:
                    tl = TraceLevel.Error;
                    break;
                }

                LoggerFileLog.Init(tl, autoFlush, logTextFile, logConsole);
            }
        }