/** ******************************************************************************************** * Just writes the prefix \"ALib Report (Error):\" (respectively \"ALib Report (Warning):\" * and the error message to the cout. * * @param report The report. **********************************************************************************************/ public virtual void Report( Report.Message report ) { ALIB.StdOutputStreamsLock.Acquire(); String sMsg= "ALib "; if ( report.Type == 0 ) sMsg= sMsg + "Error: "; else if ( report.Type == 1 ) sMsg= sMsg + "Warning: "; else sMsg= sMsg + "Report (type=" + report.Type +"): "; sMsg= sMsg + report.Contents; System.IO.TextWriter tw= report.Type == 0 || report.Type == 1 ? Console.Error : Console.Out; tw.Flush(); tw.WriteLine( sMsg ); tw.Flush(); #if DEBUG if ( System.Diagnostics.Debugger.IsAttached ) System.Diagnostics.Debug.WriteLine( sMsg ); #endif ALIB.StdOutputStreamsLock.Release(); }
/** ************************************************************************************ * Log an ALib report using ALox. * @param report The error message. **************************************************************************************/ public void Report (Report.Message report) { lox.Entry( ALoxReportWriter.LogDomain(), report.Type == 0 ? Verbosity.Error : report.Type == 1 ? Verbosity.Warning : report.Type == 2 ? Verbosity.Info : Verbosity.Verbose, report.Contents, report.Line, report.File, report.Func ); }
/** ************************************************************************************ * Write ALib reports using ALox. * @param report The report. **************************************************************************************/ public virtual void Report (Report.Message report) { lox.Entry( ALox.InternalDomains + "UT_REPORT", report.Type == 0 ? Verbosity.Error : report.Type == 1 ? Verbosity.Warning : report.Type == 2 ? Verbosity.Info : Verbosity.Verbose, report.Contents, report.Line, report.File, report.Func ); }