Exemplo n.º 1
0
        public static void Warning(string message, int EventId)
        {
            if (LogEventLog)
            {
                LoggerEventLog.Warning(message, EventId);
            }

            if (LogFileLog)
            {
                LoggerFileLog.Warning(message, EventId);
            }
        }
Exemplo n.º 2
0
        public static void Info(string message)
        {
            if (LogEventLog)
            {
                LoggerEventLog.Info(message);
            }

            if (LogFileLog)
            {
                LoggerFileLog.Info(message);
            }
        }
Exemplo n.º 3
0
        public static void Error(string message, int EventId)
        {
            if (LogEventLog)
            {
                LoggerEventLog.Error(message, EventId);
            }

            if (LogFileLog)
            {
                LoggerFileLog.Error(message, EventId);
            }
        }
Exemplo n.º 4
0
        public static void Verbose(string message, int EventId)
        {
            if (LogEventLog)
            {
                LoggerEventLog.Verbose(message, EventId);
            }

            if (LogFileLog)
            {
                LoggerFileLog.Verbose(message, EventId);
            }
        }
Exemplo n.º 5
0
        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);
            }
        }
Exemplo n.º 6
0
        public static void Log(LogEntryType logEntryType, string message)
        {
            if (LogEventLog)
            {
                LoggerEventLog.Log(logEntryType, message);
            }

            if (LogFileLog)
            {
                LoggerFileLog.Log(logEntryType, message);
            }
        }
Exemplo n.º 7
0
        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);
            }
        }