示例#1
0
 public SyslogLogger(string programName = null)
 {
     if (Platform.IsLinux)
     {
         _logger = new SIL.Linux.Logging.SyslogLogger(programName ?? "LfMerge");
     }
 }
		/// <summary>
		/// Constructor. If desired, can speficy the app name to use in syslog, overriding the default.
		/// </summary>
		/// <param name="appName">App name to use in logging to syslog. If null, the default from SyslogLogger will be used.</param>
		public SyslogExceptionHandler(string appName = null)
		{
			AppNameForLogging = appName;
			_logger = new SyslogLogger(AppNameForLogging);
			AppDomain.CurrentDomain.UnhandledException += HandleUnhandledException;
		}
示例#3
0
 public SyslogLogger(string programName = null)
 {
     #if __MonoCS__
     _logger = new SIL.Linux.Logging.SyslogLogger(programName ?? "LfMerge");
     #endif
 }
 /// <summary>
 /// Constructor. If desired, can speficy the app name to use in syslog, overriding the default.
 /// </summary>
 /// <param name="appName">App name to use in logging to syslog. If null, the default from SyslogLogger will be used.</param>
 public SyslogExceptionHandler(string appName = null)
 {
     AppNameForLogging = appName;
     _logger           = new SyslogLogger(AppNameForLogging);
     AppDomain.CurrentDomain.UnhandledException += HandleUnhandledException;
 }
示例#5
0
        public SyslogLogger(string programName = null)
        {
#if LINUX
            _logger = new SIL.Linux.Logging.SyslogLogger(programName ?? "LfMerge");
#endif
        }
示例#6
0
 private static void SetUpErrorHandling()
 {
     ErrorReport.EmailAddress = "*****@*****.**";
     ErrorReport.AddStandardProperties();
     #if __MonoCS__
     if (MiscUtils.IsUnix && Environment.GetEnvironmentVariable("DISPLAY") == null)
         ExceptionHandler.Init(new SyslogExceptionHandler("FixFwData"));
     else
     #endif
         ExceptionHandler.Init();
     #if __MonoCS__
     if (MiscUtils.IsUnix)
         logger = new SyslogLogger("FixFwData");
     #endif
 }