From 6c57a826a4287b1ca3ea418fcc2aed50ed129bdc Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Sun, 24 Nov 2019 16:39:46 +0200 Subject: Implemented AutoLogRemoval & MaxFileSizeLimit to FileLogger, LogFileParser and TFS bug reporting!!! --- Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml.cs') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml.cs index 0bd9f9d1d..bd3f04958 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml.cs @@ -11,6 +11,7 @@ using Tango.BL; using Tango.Core; using Tango.Core.DI; using Tango.Core.Helpers; +using Tango.Integration.Operation; using Tango.Logging; using Tango.PPC.Common; using Tango.PPC.Common.EventLogging; @@ -45,9 +46,17 @@ namespace Tango.PPC.UI StartupArgs = e.Args; //LogManager.RegisterLogger(new ConsoleLogger("Tango PPC Debug")); - LogManager.RegisterLogger(new FileLogger()); + LogManager.RegisterLogger(new FileLogger() { EnableAutoLogRemoval = true, EnableMaxFileSizeLimit = true }); LogManager.RegisterLogger(new VSOutputLogger()); + //Configure machine operator logger. + var operatorLogger = MachineOperator.EmbeddedLogManager.RegisteredLoggers.SingleOrDefault(x => x is FileLogger) as FileLogger; + if (operatorLogger != null) + { + operatorLogger.EnableAutoLogRemoval = true; + operatorLogger.EnableMaxFileSizeLimit = true; + } + LogManager.Log("Application Started..."); base.OnStartup(e); -- cgit v1.3.1