Beispiel #1
0
        private void SetupLogging()
        {
            ShellLogger.Severity = _logSeverity;

            SetupFileLog();

            ShellLogger.Attach(new ConsoleLog());
        }
Beispiel #2
0
        private void SetupFileLog()
        {
            DeleteOldLogFiles();

            _fileLog = new FileLog(Path.Combine(_logPath, $"{_logName}.{_logExt}"));
            _fileLog?.Open();

            ShellLogger.Attach(_fileLog);
        }
Beispiel #3
0
        private ShellManager SetupManagedShell()
        {
            EnvironmentHelper.IsAppRunningAsShell = NativeMethods.GetShellWindow() == IntPtr.Zero;

            ShellLogger.Severity = LogSeverity.Debug;
            ShellLogger.Attach(new ConsoleLog());

            return(new ShellManager(ShellManager.DefaultShellConfig));
        }
        public ManagedShellLoggerProvider(ManagedShellFileLoggerOptions settings, Settings cairoSettings)
        {
            _loggers           = new ConcurrentDictionary <string, Lazy <ManagedShellLogger> >();
            _settings          = settings;
            this.cairoSettings = cairoSettings;

            SetupLoggingSystem();

            SetupLoggingSeverity();

            cairoSettings.PropertyChanged += CairoSettings_PropertyChanged;

            _fileLog = new FileLog(_filename);
            _fileLog.Open();
            ShellLogger.Attach(_fileLog);
            ShellLogger.Attach(new ConsoleLog());
        }
Beispiel #5
0
 public App()
 {
     ShellLogger.Severity = LogSeverity.Debug;
     ShellLogger.Attach(new ConsoleLog());
 }