当前位置: 首页>>代码示例>>C#>>正文


C# CLogger.SetTimerInterval方法代码示例

本文整理汇总了C#中CLogger.SetTimerInterval方法的典型用法代码示例。如果您正苦于以下问题:C# CLogger.SetTimerInterval方法的具体用法?C# CLogger.SetTimerInterval怎么用?C# CLogger.SetTimerInterval使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CLogger的用法示例。


在下文中一共展示了CLogger.SetTimerInterval方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: InitializeLogger

 public static bool InitializeLogger()
 {
     try
     {
         L = new CLogger();
         L.SetLogLevel((LogLevel)((TraceLevel < 0 || TraceLevel > 4) ? 3 : TraceLevel));
         L.SetLogFile(@"C:\tmp\IISRecorderLog.log");
         L.SetTimerInterval(LogType.FILE, 0);
         L.SetLogFileSize(10000000);
         return true;
     }
     catch (Exception er)
     {
         EventLog.WriteEntry("RemoteRecorderBase->InitializeLogger() ", er.ToString(), EventLogEntryType.Error);
         return false;
     }
 }
开发者ID:salimci,项目名称:Legacy-Remote-Recorder,代码行数:17,代码来源:Program.cs

示例2: Initialize_Logger

        public bool Initialize_Logger()
        {
            try
            {
                L = new CLogger();
                switch (trc_level)
                {
                    case 0:
                        {
                            L.SetLogLevel(LogLevel.NONE);
                        } break;
                    case 1:
                        {
                            L.SetLogLevel(LogLevel.INFORM);
                        } break;
                    case 2:
                        {
                            L.SetLogLevel(LogLevel.WARN);
                        } break;
                    case 3:
                        {
                            L.SetLogLevel(LogLevel.ERROR);
                        } break;
                    case 4:
                        {
                            L.SetLogLevel(LogLevel.DEBUG);
                        } break;
                }

                L.SetLogFile(err_log);
                L.SetTimerInterval(LogType.FILE, logging_interval);
                L.SetLogFileSize(log_size);
                return true;
            }
            catch (Exception er)
            {
                EventLog.WriteEntry("Security Manager NetScalerNetworkBalancerV_1_0_0Recorder Recorder", er.ToString(), EventLogEntryType.Error);
                return false;
            }
        }
开发者ID:salimci,项目名称:Legacy-Remote-Recorder,代码行数:40,代码来源:Class1.cs

示例3: InitializeLogger

        private Boolean InitializeLogger()
        {
            try
            {
                _log = new CLogger();
                switch (_traceLevel)
                {
                    case 0: { _log.SetLogLevel(LogLevel.NONE); } break;
                    case 1: { _log.SetLogLevel(LogLevel.INFORM); } break;
                    case 2: { _log.SetLogLevel(LogLevel.WARN); } break;
                    case 3: { _log.SetLogLevel(LogLevel.ERROR); } break;
                    case 4: { _log.SetLogLevel(LogLevel.DEBUG); } break;
                }

                _log.SetLogFile(_errLog);
                _log.SetTimerInterval(LogType.FILE, logging_interval);
                _log.SetLogFileSize(_logSize);

                return true;
            }
            catch (Exception er)
            {
                EventLog.WriteEntry("Security Manager MCAffeeUTMSyslogRecorder", er.ToString(), EventLogEntryType.Error);
                return false;
            }
        }
开发者ID:salimci,项目名称:Legacy-Remote-Recorder,代码行数:26,代码来源:MCAffeeUTMSyslogRecorder.cs

示例4: InitializeLogger

 public bool InitializeLogger()
 {
     try
     {
         L = new CLogger();
         L.SetLogLevel((LogLevel)((trcLevel < 0 || trcLevel > 4) ? 3 : trcLevel));
         L.SetLogFile(errLog);
         L.SetTimerInterval(LogType.FILE, loggingInterval);
         L.SetLogFileSize(logSize);
         return true;
     }
     catch (Exception er)
     {
         EventLog.WriteEntry("RemoteRecorderBase->InitializeLogger() ", er.ToString(), EventLogEntryType.Error);
         return false;
     }
 }
开发者ID:salimci,项目名称:Legacy-Remote-Recorder,代码行数:17,代码来源:Class1.cs

示例5: Initialize_Logger

 public bool Initialize_Logger()
 {
     try
     {
         L = new CLogger();
         switch (trc_level)
         {
             case 0:
                 {
                     L.SetLogLevel(LogLevel.NONE);
                 } break;
             case 1:
                 {
                     L.SetLogLevel(LogLevel.INFORM);
                 } break;
             case 2:
                 {
                     L.SetLogLevel(LogLevel.WARN);
                 } break;
             case 3:
                 {
                     L.SetLogLevel(LogLevel.ERROR);
                 } break;
             case 4:
                 {
                     L.SetLogLevel(LogLevel.DEBUG);
                 } break;
         }
         if (!string.IsNullOrEmpty(LogLocation))
             err_log = Path.Combine(LogLocation, @"EventLogFileAuditRecorder" + Id + ".log");
         L.SetLogFile(err_log);
         L.SetTimerInterval(LogType.FILE, logging_interval);
         L.SetLogFileSize(log_size);
         return true;
     }
     catch (Exception er)
     {
         EventLog.WriteEntry("Security Manager RedHatSecure Recorder", er.ToString(), EventLogEntryType.Error);
         return false;
     }
 }
开发者ID:salimci,项目名称:Legacy-Remote-Recorder,代码行数:41,代码来源:EventLogFileAuditRecorder.cs

示例6: InitializeLogger

 protected bool InitializeLogger()
 {
     try
     {
         L = new CLogger();
         switch (TrcLevel)
         {
             case 0:
                 {
                     L.SetLogLevel(LogLevel.NONE);
                 }
                 break;
             case 1:
                 {
                     L.SetLogLevel(LogLevel.INFORM);
                 }
                 break;
             case 2:
                 {
                     L.SetLogLevel(LogLevel.WARN);
                 }
                 break;
             case 3:
                 {
                     L.SetLogLevel(LogLevel.ERROR);
                 }
                 break;
             case 4:
                 {
                     L.SetLogLevel(LogLevel.DEBUG);
                 }
                 break;
         }
         L.SetLogFile(ErrLog);
         L.SetTimerInterval(LogType.FILE, LoggingInterval);
         L.SetLogFileSize(LogSize);
         return true;
     }
     catch (Exception er)
     {
         EventLog.WriteEntry("Security Manager IISUnified Recorder", er.ToString(), EventLogEntryType.Error);
         return false;
     }
 }
开发者ID:salimci,项目名称:Legacy-Remote-Recorder,代码行数:44,代码来源:IISUnifiedRecorder.cs

示例7: InitializeLogger

        public Boolean InitializeLogger()
        {
            try
            {
                _log = new CLogger();

                switch (_traceLevel)
                {
                    case 0:
                        _log.SetLogLevel(LogLevel.NONE);
                        break;
                    case 1:
                        _log.SetLogLevel(LogLevel.INFORM);
                        break;
                    case 2:
                        _log.SetLogLevel(LogLevel.WARN);
                        break;
                    case 3:
                        _log.SetLogLevel(LogLevel.ERROR);
                        break;
                    case 4:
                        _log.SetLogLevel(LogLevel.DEBUG);
                        break;
                }

                _log.SetLogFile(_errLog);
                _log.SetTimerInterval(LogType.FILE, _loggingInterval);
                _log.SetLogFileSize(_logSize);

                return true;
            }
            catch (Exception ex)
            {
                EventLog.WriteEntry("Security Manager SQLServer Recorder", ex.ToString(), EventLogEntryType.Error);
                return false;
            }
        }
开发者ID:salimci,项目名称:Legacy-Remote-Recorder,代码行数:37,代码来源:Class1.cs

示例8: InitializeLogger

        protected virtual NextInstruction InitializeLogger()
        {
            try
            {
                if (logger != null)
                    return NextInstruction.Do;
                if (String.IsNullOrEmpty(logFile))
                {
                    logFile = GetLogFileFromRegistry();
                    if (String.IsNullOrEmpty(logFile))
                        return NextInstruction.Abort;
                }

                logger = new CLogger();
                logger.SetLogLevel((LogLevel)traceLevel);
                logger.SetLogFile(logFile);
                logger.SetTimerInterval(logType, loggingInterval <= 0 ? 60000 : loggingInterval);
                logger.SetLogFileSize(logSize <= 0 ? 10 * 1024 * 1024 : logSize);
                return NextInstruction.Do;
            }
            catch (Exception er)
            {
                Log(LogLevel.ERROR, er.ToString());
                return NextInstruction.Abort;
            }
        }
开发者ID:salimci,项目名称:Legacy-Remote-Recorder,代码行数:26,代码来源:RecorderBase.cs

示例9: Initialize_Logger

        //initialize logging informations
        public bool Initialize_Logger()
        {
            try
            {
                L = new CLogger();
                switch (trc_level)
                {
                    case 0:
                        {
                            L.SetLogLevel(LogLevel.NONE);
                        } break;
                    case 1:
                        {
                            L.SetLogLevel(LogLevel.INFORM);
                        } break;
                    case 2:
                        {
                            L.SetLogLevel(LogLevel.WARN);
                        } break;
                    case 3:
                        {
                            L.SetLogLevel(LogLevel.ERROR);
                        } break;
                    case 4:
                        {
                            L.SetLogLevel(LogLevel.DEBUG);
                        } break;
                }

                L.SetLogFile("EventLogViewer.log");
                L.SetTimerInterval(LogType.FILE, Convert.ToUInt32(logging_interval));
                L.SetLogFileSize(Convert.ToUInt32(log_size));

                return true;
            }
            catch (Exception er)
            {
                EventLog.WriteEntry("Security Manager JuniperSyslogRecorder Recorder", er.ToString(), EventLogEntryType.Error);
                return false;
            }
        }
开发者ID:salimci,项目名称:Legacy-Remote-Recorder,代码行数:42,代码来源:Class1.cs

示例10: Initialize_Logger

        public bool Initialize_Logger()
        {
            try
            {
                _l = new CLogger();
                switch (_trcLevel)
                {
                    case 0:
                        {
                            _l.SetLogLevel(LogLevel.NONE);
                        } break;
                    case 1:
                        {
                            _l.SetLogLevel(LogLevel.INFORM);
                        } break;
                    case 2:
                        {
                            _l.SetLogLevel(LogLevel.WARN);
                        } break;
                    case 3:
                        {
                            _l.SetLogLevel(LogLevel.ERROR);
                        } break;
                    case 4:
                        {
                            _l.SetLogLevel(LogLevel.DEBUG);
                        } break;
                }

                _l.SetLogFile(_errLog);
                _l.SetTimerInterval(LogType.FILE, LoggingInterval);
                _l.SetLogFileSize(LogSize);

                return true;
            }
            catch (Exception er)
            {
                EventLog.WriteEntry("Security Manager CryptTechHotspotV_1_0_1Recorder", er.ToString(), EventLogEntryType.Error);
                return false;
            }
        }
开发者ID:salimci,项目名称:Legacy-Remote-Recorder,代码行数:41,代码来源:Class1.cs


注:本文中的CLogger.SetTimerInterval方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。