示例#1
0
        static void UpdateSettings(HostSettings settings, CommandLineOptions options)
        {
            //Command line overrides settings
            if (options.Verbose)
            {
                settings.Debug = true;
            }

            //Update logging based upon the options and settings
            if (settings.Debug)
            {
                LogManager.SetVerboseLogging();
            }

            if (!String.IsNullOrEmpty(options.LogFile))
            {
                if (String.IsNullOrEmpty(System.IO.Path.GetDirectoryName(options.LogFile)))
                {
                    options.LogFile = FileSystem.BuildPath(settings.OutputPath, options.LogFile);
                }

                LogManager.AddFileLogger(options.LogFile);
            }
            ;
        }