예제 #1
0
        public void Log(LogType type, LogDetail detail)
        {
            switch (type)
            {
            case LogType.PERFORMANCE:
                WritePerf(detail);
                break;

            case LogType.USAGE:
                WriteUsage(detail);
                break;

            case LogType.ERROR:
                WriteError(detail);
                break;

            case LogType.DIAGNOSTIC:
                WriteDiagnostic(detail);
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(type), type, null);
            }
        }
예제 #2
0
 private void WriteUsage(LogDetail infoLog)
 {
     usageLogger.Write(LogEventLevel.Information, "{@LogDetail}", infoLog);
 }
예제 #3
0
 private void WritePerf(LogDetail infoLog)
 {
     perfLogger.Write(LogEventLevel.Information, "{@LogDetail}", infoLog);
 }
예제 #4
0
 public static void WriteError(LogDetail log)
 {
     ErrorLogger.Write(LogEventLevel.Error, "{@LogDetail}", log);
 }
예제 #5
0
 public static void WritePerf(LogDetail log)
 {
     PerfLogger.Write(LogEventLevel.Information, "{@LogDetail}", log);
 }