Exemplo n.º 1
0
 /// <summary>
 /// Closes logging system
 /// </summary>
 public static void CloseFileLogging()
 {
     if (FileLog != null)
     {
         Trace.Listeners.Remove(FileLog);
         FileLog.Close();
         FileLog.Dispose();
         FileLog = null;
     }
 }
Exemplo n.º 2
0
Arquivo: Log.cs Projeto: mymei/UE4
 /// <summary>
 /// Closes logging system
 /// </summary>
 public static void CloseFileLogging()
 {
     if (FileLog != null)
     {
         Trace.Listeners.Remove(FileLog);
         FileLog.Close();
         FileLog.Dispose();
         FileLog = null;
     }
 }
Exemplo n.º 3
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;
            }
        }
Exemplo n.º 4
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;
			}
		}
Exemplo n.º 5
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;
            }
        }
Exemplo n.º 6
0
Arquivo: Log.cs Projeto: 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;
            }
        }