Exemple #1
0
        public static int Main(string[] args)
        {
            var logLevel = LogLevel.Information;

            if (CmdUtils.IsDebugModeEnabled())
            {
                logLevel = LogLevel.Debug;
            }

            using (var log = new ConsoleLogger(logLevel))
            {
                var task = MainCore(args, log);
                return(task.Result);
            }
        }
Exemple #2
0
 internal static void SetVerbosity(ILogger log, bool verbose)
 {
     if (log is ConsoleLogger consoleLogger)
     {
         if (CmdUtils.IsDebugModeEnabled())
         {
             consoleLogger.VerbosityLevel = LogLevel.Debug;
         }
         else if (verbose)
         {
             consoleLogger.VerbosityLevel = LogLevel.Verbose;
         }
         else
         {
             consoleLogger.VerbosityLevel   = DefaultLogLevel;
             consoleLogger.CollapseMessages = true;
         }
     }
 }