コード例 #1
0
ファイル: ConnectionOutputLog.cs プロジェクト: reductech/Nuix
 /// <summary>
 /// Get the severity as an object
 /// </summary>
 public Result <LogSeverity, IErrorBuilder> TryGetSeverity()
 {
     return(Severity.ToLowerInvariant() switch
     {
         "trace" => LogSeverity.Trace,
         "info" => LogSeverity.Information,
         "warn" => LogSeverity.Warning,
         "error" => LogSeverity.Error,
         "fatal" => LogSeverity.Critical,
         "debug" => LogSeverity.Debug,
         _ => new ErrorBuilder(ErrorCode.CouldNotParse, Severity, nameof(LogSeverity)),
     });