Exemple #1
0
        /// <summary>
        /// Initializes trace logging.
        /// </summary>
        /// <param name="CommandLine">Command line.</param>
        public static void InitLogging(string[] CommandLine)
        {
            var VerbosityLevel = CommandUtils.ParseParam(CommandLine, "-Verbose") ? TraceEventType.Verbose : TraceEventType.Information;
            var Filter         = new VerbosityFilter(VerbosityLevel);

            Trace.Listeners.Add(new AutomationConsoleTraceListener());
            FileLog = new AutomationFileTraceListener();
            Trace.Listeners.Add(FileLog);
            Trace.Listeners.Add(new AutomationMemoryLogListener());
            foreach (TraceListener Listener in Trace.Listeners)
            {
                Listener.Filter = Filter;
            }
        }
Exemple #2
0
		/// <summary>
		/// Initializes trace logging.
		/// </summary>
		/// <param name="CommandLine">Command line.</param>
		public static void InitLogging(string[] CommandLine)
		{
			Timer = (CommandUtils.ParseParam(CommandLine, "-Timestamps"))? Stopwatch.StartNew() : null;
			var VerbosityLevel = CommandUtils.ParseParam(CommandLine, "-Verbose") ? TraceEventType.Verbose : TraceEventType.Information;
			var Filter = new VerbosityFilter(VerbosityLevel);
			Trace.Listeners.Add(new AutomationConsoleTraceListener());
			FileLog = new AutomationFileTraceListener();
			Trace.Listeners.Add(FileLog);
			Trace.Listeners.Add(new AutomationMemoryLogListener());
			foreach (TraceListener Listener in Trace.Listeners)
			{
				Listener.Filter = Filter;
			}
		}
Exemple #3
0
        /// <summary>
        /// Initializes trace logging.
        /// </summary>
        /// <param name="CommandLine">Command line.</param>
        public static void InitLogging(string[] CommandLine)
        {
            // ensure UTF8Output flag is respected, since we are initializing logging early in the program.
            if (CommandLine.Any(Arg => Arg.Equals("-utf8output", StringComparison.InvariantCultureIgnoreCase)))
            {
                Console.OutputEncoding = new System.Text.UTF8Encoding(false, false);
            }

            Timer = (CommandUtils.ParseParam(CommandLine, "-Timestamps"))? Stopwatch.StartNew() : null;
            var VerbosityLevel = CommandUtils.ParseParam(CommandLine, "-Verbose") ? TraceEventType.Verbose : TraceEventType.Information;
            var Filter         = new VerbosityFilter(VerbosityLevel);

            Trace.Listeners.Add(new AutomationConsoleTraceListener());
            FileLog = new AutomationFileTraceListener();
            Trace.Listeners.Add(FileLog);
            Trace.Listeners.Add(new AutomationMemoryLogListener());
            foreach (TraceListener Listener in Trace.Listeners)
            {
                Listener.Filter = Filter;
            }
        }
Exemple #4
0
 /// <summary>
 /// Initializes trace logging.
 /// </summary>
 /// <param name="CommandLine">Command line.</param>
 public static void InitLogging(string[] CommandLine)
 {
     var VerbosityLevel = CommandUtils.ParseParam(CommandLine, "-Verbose") ? TraceEventType.Verbose : TraceEventType.Information;
     var Filter = new VerbosityFilter(VerbosityLevel);
     Trace.Listeners.Add(new AutomationConsoleTraceListener());
     Trace.Listeners.Add(new AutomationFileTraceListener());
     Trace.Listeners.Add(new AutomationMemoryLogListener());
     foreach (TraceListener Listener in Trace.Listeners)
     {
         Listener.Filter = Filter;
     }
 }
Exemple #5
0
Fichier : Log.cs Projet : mymei/UE4
        /// <summary>
        /// Initializes trace logging.
        /// </summary>
        /// <param name="CommandLine">Command line.</param>
        public static void InitLogging(string[] CommandLine)
        {
            // ensure UTF8Output flag is respected, since we are initializing logging early in the program.
            if (CommandLine.Any(Arg => Arg.Equals("-utf8output", StringComparison.InvariantCultureIgnoreCase)))
            {
                Console.OutputEncoding = new System.Text.UTF8Encoding(false, false);
            }

            Timer = (CommandUtils.ParseParam(CommandLine, "-Timestamps"))? Stopwatch.StartNew() : null;
            var VerbosityLevel = CommandUtils.ParseParam(CommandLine, "-Verbose") ? TraceEventType.Verbose : TraceEventType.Information;
            var Filter = new VerbosityFilter(VerbosityLevel);
            Trace.Listeners.Add(new AutomationConsoleTraceListener());
            FileLog = new AutomationFileTraceListener();
            Trace.Listeners.Add(FileLog);
            Trace.Listeners.Add(new AutomationMemoryLogListener());
            foreach (TraceListener Listener in Trace.Listeners)
            {
                Listener.Filter = Filter;
            }
        }