Example #1
0
        /// <summary>
        /// Shuts down the <see cref="ILogProvider"/> instance.
        /// </summary>
        public override void Shutdown()
        {
            DebugMonitor.OnOutputDebugString -= DebugMonitorOnOutputDebugString;

            try
            {
                DebugMonitor.Stop();
            }
            catch (Exception ex)
            {
                Logger.Error(
                    "Error while initializig the windows debugger receiver: {0}"
                    , ex.Message);
            }

            base.Shutdown();
        }
Example #2
0
        /// <summary>
        /// Intizializes the <see cref="ILogProvider"/>.
        /// </summary>
        /// <param name="logHandler">The <see cref="ILogHandler"/> that may handle incomming <see cref="LogMessage"/>s.</param>
        public override void Initialize(ILogHandler logHandler)
        {
            base.Initialize(logHandler);

            try
            {
                DebugMonitor.OnOutputDebugString += DebugMonitorOnOutputDebugString;
                DebugMonitor.Start();
            }
            catch (Exception ex)
            {
                Logger.Error(
                    "Error while initializig the windows debugger receiver: {0}"
                    , ex.Message);

                Shutdown();
            }
        }