Beispiel #1
0
        public Errorhandling(string programname, bool spawnconsole, bool logtofile)
        {
            _programname = programname;
            _spawnconsole = spawnconsole;
            logger = new Logging(logtofile, spawnconsole);
            Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);

            logger.log("Initialized errorhandling class. Errorhandler version: " + errorhandlerversion + " Listening to master program: " + programname, Logging.Priority.Info);
            #if (DEBUG)
            logger.log("This is a debug version. It might run a bit slower and it has some debug features (like more verbose logging). make sure you have the correct version!", Logging.Priority.Warning);
            #endif
        }
Beispiel #2
0
 public LogEventArgs(string logitem, Logging.Priority priority)
 {
     _logitem = logitem;
     _priority = priority;
 }