Inheritance: Splat.ILogger
        public void SetupLogging(string productTitle, string token = null) {
            if ((token != null) && (ConfigurationManager.AppSettings["Logentries.Token"] == null))
                ConfigurationManager.AppSettings["Logentries.Token"] = token;
            SetupNlog.Initialize(productTitle);
            if (Common.Flags.Verbose) {
                var splatLogger = new NLogSplatLogger();
                Locator.CurrentMutable.Register(() => splatLogger, typeof(ILogger));
            }
#if DEBUG
            LogHost.Default.Level = LogLevel.Debug;
#endif
        }
示例#2
0
        public void SetupLogging(string productTitle, string token = null)
        {
            if ((token != null) && (ConfigurationManager.AppSettings["Logentries.Token"] == null))
            {
                ConfigurationManager.AppSettings["Logentries.Token"] = token;
            }
            SetupNlog.Initialize(productTitle);
            if (Common.Flags.Verbose)
            {
                var splatLogger = new NLogSplatLogger();
                Locator.CurrentMutable.Register(() => splatLogger, typeof(ILogger));
            }
#if DEBUG
            LogHost.Default.Level = LogLevel.Debug;
#endif
        }