public static void Instance(String domain, Verbosity verbosity, Object o, int maxRecursion, String headline = null, Lox lox = null, [CallerLineNumber] int cln = 0, [CallerFilePath] String csf = "", [CallerMemberName] String cmn = "") { #if ALOX_DBG_LOG || ALOX_REL_LOG try { Lock.Acquire(); // if no lox given, use static Log.LOX or, if debug logging is not active, return if (lox == null) #if ALOX_DBG_LOG { lox = Log.LOX; } #else { return; } #endif #if !(ALOX_WP71 || ALOX_WP8 || ALOX_NO_REFLECTION) // dump exception to the Buffer instMain(o, maxRecursion, headline); // log it using the static Log interface lox.Entry(domain, verbosity, toolBuf, cln, csf, cmn); #else lox.Entry(domain, verbosity, "LoxTools.Instance(): Reflection not supported on this platform. ToString(): ", cln, csf, cmn); lox.Entry(domain, verbosity, (" " + (o == null ? "null" : o.ToString())), cln, csf, cmn); #endif // NO_REFLECTION } finally { Lock.Release(); } #endif }
public static void XML(String domain, Verbosity verbosity, XElement xElement, String headLine = null, Lox lox = null, [CallerLineNumber] int cln = 0, [CallerFilePath] String csf = "", [CallerMemberName] String cmn = "") { #if ALOX_DBG_LOG || ALOX_REL_LOG try { Lock.Acquire(); // create/clear toolBuf if (toolBuf == null) { toolBuf = new AString(1024); } else { toolBuf.Clear(); } // dump exception to the Buffer xmlElement(xElement, headLine, 0); // if no lox given, use static Log.LOX or, if debug logging is not active, return if (lox == null) #if ALOX_DBG_LOG { lox = Log.LOX; } #else { return; } #endif // log it using the static Log interface lox.Entry(domain, verbosity, toolBuf, cln, csf, cmn); } finally { Lock.Release(); } #endif }
/** ************************************************************************************ * Log an ALib report using ALox. * @param report The error message. **************************************************************************************/ public void Report(Report.Message report) { lox.Entry(ALox.InternalDomains + "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); }
public void Print(String csf, int cln, String cmn, Verbosity verbosity, Object msg) { lox.Entry("UT", verbosity, msg, cln, csf, cmn); }
public static void XML( String domain, Verbosity verbosity, XElement xElement, String headLine= null, Lox lox= null, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="" ) { #if ALOX_DBG_LOG || ALOX_REL_LOG try { Lock.Acquire(); // create/clear toolBuf if ( toolBuf == null ) toolBuf= new AString( 1024 ); else toolBuf.Clear(); // dump exception to the Buffer xmlElement( xElement, headLine, 0 ); // if no lox given, use static Log.LOX or, if debug logging is not active, return if ( lox == null ) #if ALOX_DBG_LOG lox= Log.LOX; #else return; #endif // log it using the static Log interface lox.Entry ( domain, verbosity, toolBuf, cln,csf,cmn ); } finally { Lock.Release(); } #endif }
public static void Instance( String domain, Verbosity verbosity, Object o, int maxRecursion, String headline= null, Lox lox= null, [CallerLineNumber] int cln=0,[CallerFilePath] String csf="",[CallerMemberName] String cmn="" ) { #if ALOX_DBG_LOG || ALOX_REL_LOG try { Lock.Acquire(); // if no lox given, use static Log.LOX or, if debug logging is not active, return if ( lox == null ) #if ALOX_DBG_LOG lox= Log.LOX; #else return; #endif #if !(ALOX_WP71 || ALOX_WP8 || ALOX_NO_REFLECTION) // dump exception to the Buffer instMain( o, maxRecursion, headline ); // log it using the static Log interface lox.Entry ( domain, verbosity, toolBuf, cln,csf,cmn ); #else lox.Entry ( domain, verbosity, "LoxTools.Instance(): Reflection not supported on this platform. ToString(): ", cln,csf,cmn ); lox.Entry ( domain, verbosity, ( " " + (o == null ? "null" : o.ToString())), cln,csf,cmn ); #endif // NO_REFLECTION } finally { Lock.Release(); } #endif }