コード例 #1
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="level">Log level verbosity</param>
        /// <param name="numberOfMsgBeforeDumpToLog">How many messages are put out before they are dumped to log</param>
        public HelperLogReader(MsgLevel level, int numberOfMsgBeforeDumpToLog)
        {
            // Create delegate to attach to Log
            this.myLogReadDelegate = new LogingMsgEventDelegate(this.Log_OnLogMsgEvent);

            // Set log verbosity and number of messages that have to arrive before the log
            // thread fires
            Log.SetVerbosity(level);
            Log.SetMsgNumberThreshold(numberOfMsgBeforeDumpToLog);

            // Stream the errors caught by WrapErr to the Log
            WrapErr.InitialiseOnExceptionLogDelegate(Log.LogExceptionDelegate);
        }
コード例 #2
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="level">Log level verbosity</param>
        /// <param name="numberOfMsgBeforeDumpToLog">How many messages are put out before they are dumped to log</param>
        public HelperLogReader(MsgLevel level, int numberOfMsgBeforeDumpToLog)
        {
            // Create delegate to attach to Log
            this.myLogReadDelegate = new LogingMsgEventDelegate(this.Log_OnLogMsgEvent);

            // Set log verbosity and number of messages that have to arrive before the log
            // thread fires
            Log.SetVerbosity(level);
            Log.SetMsgNumberThreshold(numberOfMsgBeforeDumpToLog);

            // Stream the errors caught by WrapErr to the Log
            WrapErr.InitialiseOnExceptionLogDelegate(Log.LogExceptionDelegate);
        }