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


C# ReportLevel类代码示例

本文整理汇总了C#中ReportLevel的典型用法代码示例。如果您正苦于以下问题:C# ReportLevel类的具体用法?C# ReportLevel怎么用?C# ReportLevel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: Log

 private void Log(ReportLevel level, string msg, params object[] args)
 {
     foreach (var appender in Appenders)
     {
         appender.AppendThresholdCheck(level, msg, args);
     }
 }
开发者ID:EBojilova,项目名称:SoftUni-3,代码行数:7,代码来源:Logger.cs

示例2: LogHandler

 private void LogHandler(string msg, ReportLevel reportLevel)
 {
     foreach (var appender in this.Appenders)
     {
         appender.Append(DateTime.Now, reportLevel, msg);
     }
 }
开发者ID:ikolev94,项目名称:Homeworks,代码行数:7,代码来源:Logger.cs

示例3: AppendToAll

 private void AppendToAll(string msg, ReportLevel reportLevel)
 {
     foreach (var appender in this.appenders)
     {
         appender.Append(msg, reportLevel, DateTime.Now);
     }
 }
开发者ID:nok32,项目名称:SoftUny-HW,代码行数:7,代码来源:Logger.cs

示例4: Append

 public override void Append(DateTime date, ReportLevel level, string messege)
 {
     if (this.ReportLevel <= level)
     {
         Console.WriteLine(this.Layout.Format(date, level, messege));
     }
 }
开发者ID:zhecho1215,项目名称:Softuni,代码行数:7,代码来源:ConsoleAppender.cs

示例5: LogMessage

 private void LogMessage(ReportLevel level, string message)
 {
     foreach (var appender in this.Appenders)
     {
         appender.Append(message, level, DateTime.Now);
     }
 }
开发者ID:aanguelov,项目名称:HQC_Homeworks,代码行数:7,代码来源:Logger.cs

示例6: Format

        public string Format(string msg, ReportLevel reportLevel)
        {
            DateTime time = DateTime.Now;
            string output = $"{time} - {reportLevel} - {msg}";

            return output;
        }
开发者ID:pavelilchev,项目名称:HomeWorks,代码行数:7,代码来源:SimpleLayout.cs

示例7: OutputMessage

 public void OutputMessage(string message, ReportLevel reportLevel)
 {
     if (reportLevel >= this.ReportThreshold)
     {
         Console.WriteLine(this.layoutFormat.LayoutFormat(message, reportLevel));
     }
 }
开发者ID:exploitx3,项目名称:HighQualityCode,代码行数:7,代码来源:ConsoleAppender.cs

示例8: Log

 private void Log(ReportLevel reportLevel, string message, string logType)
 {
     foreach (var appender in this.Appenders.Where(appender => reportLevel >= appender.ReportLevel))
     {
         appender.Append(message, logType);
     }
 }
开发者ID:msmilkoff,项目名称:HighQualityCodeHomeworks,代码行数:7,代码来源:Logger.cs

示例9: Append

 public void Append(DateTime date, ReportLevel reportLevel, string message)
 {
     if (this.ReportLevel <= reportLevel)
     {
         this.AppendExecuter(date, reportLevel, message);
     }
 }
开发者ID:ikolev94,项目名称:Exercises,代码行数:7,代码来源:Appender.cs

示例10: Append

 public override void Append(ReportLevel level, string msg, params object[] args)
 {
     using (var sr = new StreamWriter(file, true))
     {
         sr.WriteLine(this.Layout.Convert(level, msg, args));
     }
 }
开发者ID:EBojilova,项目名称:SoftUni-3,代码行数:7,代码来源:FileAppender.cs

示例11: Append

        public override void Append(string message, ReportLevel level, DateTime date)
        {
            var result = this.Layout.FormatLog(message, level, date);

            this.writer.WriteLine(result);
            this.writer.Flush();
        }
开发者ID:aanguelov,项目名称:HQC_Homeworks,代码行数:7,代码来源:FileAppender.cs

示例12: Append

        public override void Append(string msg, ReportLevel level, DateTime date)
        {
            var output = this.Formatter.Format(msg, level, date);

            this.writer.WriteLine(output);
            this.writer.Flush();
        }
开发者ID:SivaCse,项目名称:Object-Oriented-Programming,代码行数:7,代码来源:FileAppender.cs

示例13: FormatLogString

        public override string FormatLogString(ReportLevel reportLevel, string logMessage)
        {
            string logString = string.Format("{0} - {1} - {2}",
                DateTime.Now, this.ReportLevelAsString(reportLevel), logMessage);

            return logString;
        }
开发者ID:mgulubov,项目名称:Homework-SOLIDPrinciplesInSoftwareDesign,代码行数:7,代码来源:SimpleLayout.cs

示例14: FormatLog

        public string FormatLog(DateTime date, ReportLevel reportLevel, string message)
        {
            string formattedLog = string.Format(
                LogSimpleFormat + Environment.NewLine, date, reportLevel, message);

            return formattedLog;
        }
开发者ID:svetlozarkirkov,项目名称:HighQualityCode-Homeworks,代码行数:7,代码来源:SimpleLayout.cs

示例15: ReportLevelAsString

 protected string ReportLevelAsString(ReportLevel reportLevel)
 {
     switch (reportLevel)
     {
         case ReportLevel.Info:
             {
                 return "Info";
             }
         case ReportLevel.Warn:
             {
                 return "Warning";
             }
         case ReportLevel.Error:
             {
                 return "Error";
             }
         case ReportLevel.Critical:
             {
                 return "Critical";
             }
         case ReportLevel.Fatal:
             {
                 return "Fatal";
             }
         default:
             {
                 throw new ArgumentOutOfRangeException("Unrecognised Report Level");
             }
     }
 }
开发者ID:nikolay-dimitrov,项目名称:SoftUniHomeWorks,代码行数:30,代码来源:AbstractLayout.cs


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