/** * Output a diagnostic message to a user-specified destination (if the * user has enabled diagnostic logging). * * @param msg diagnostic message * @since 1.1 */ protected void logDiagnostic(String msg) { if (isDiagnosticsEnabled()) { logRawDiagnostic(diagnosticPrefix + msg); } }
/** * Output a diagnostic message to a user-specified destination (if the * user has enabled diagnostic logging). * * @param msg diagnostic message * @since 1.1 */ protected void logDiagnostic(String msg) { if (isDiagnosticsEnabled()) { logRawDiagnostic(diagnosticPrefix + msg); } }
/** * Public no-arguments constructor required by the lookup mechanism. */ public LogFactoryImpl() { super(); initDiagnostics(); // method on this object if (isDiagnosticsEnabled()) { logDiagnostic("Instance created."); } }
if (isDiagnosticsEnabled()) { logDiagnostic("Checking for '" + name + "'."); if (isDiagnosticsEnabled()) { logDiagnostic("Did not find '" + name + "'."); if (isDiagnosticsEnabled()) { logDiagnostic("Found '" + name + "'."); if (isDiagnosticsEnabled()) { logDiagnostic("Logging system '" + name + "' is available but not useable.");
if (isDiagnosticsEnabled()) { logDiagnostic("[ENV] Trying to get configuration for item " + property); if (isDiagnosticsEnabled()) { logDiagnostic("[ENV] Found LogFactory attribute [" + valueObj + "] for " + property); if (isDiagnosticsEnabled()) { logDiagnostic("[ENV] No LogFactory attribute found for " + property); if (isDiagnosticsEnabled()) { logDiagnostic("[ENV] Found system property [" + value + "] for " + property); if (isDiagnosticsEnabled()) { logDiagnostic("[ENV] No system property found for property " + property); if (isDiagnosticsEnabled()) { logDiagnostic("[ENV] Security prevented reading system property " + property); if (isDiagnosticsEnabled()) { logDiagnostic("[ENV] No configuration defined for item " + property);
/** * Public no-arguments constructor required by the lookup mechanism. */ public LogFactoryImpl() { super(); initDiagnostics(); // method on this object if (isDiagnosticsEnabled()) { logDiagnostic("Instance created."); } }
if (isDiagnosticsEnabled()) { logDiagnostic("Checking for '" + name + "'."); if (isDiagnosticsEnabled()) { logDiagnostic("Did not find '" + name + "'."); if (isDiagnosticsEnabled()) { logDiagnostic("Found '" + name + "'."); if (isDiagnosticsEnabled()) { logDiagnostic("Logging system '" + name + "' is available but not useable.");
/** * Generates an internal diagnostic logging of the discovery failure and * then throws a <code>LogConfigurationException</code> that wraps * the passed <code>Throwable</code>. * * @param logAdapterClassName is the class name of the Log implementation * that could not be instantiated. Cannot be <code>null</code>. * * @param classLoader is the classloader that we were trying to load the * logAdapterClassName from when the exception occurred. * * @param discoveryFlaw is the Throwable created by the classloader * * @throws LogConfigurationException ALWAYS */ private void handleFlawedDiscovery(String logAdapterClassName, ClassLoader classLoader, Throwable discoveryFlaw) { if (isDiagnosticsEnabled()) { logDiagnostic("Could not instantiate Log '" + logAdapterClassName + "' -- " + discoveryFlaw.getClass().getName() + ": " + discoveryFlaw.getLocalizedMessage()); } if (!allowFlawedDiscovery) { throw new LogConfigurationException(discoveryFlaw); } }
if (isDiagnosticsEnabled()) { logDiagnostic("Could not instantiate Log '" + logAdapterClassName + "' -- " +
if (isDiagnosticsEnabled()) { logDiagnostic("Trying to get log class from attribute '" + LOG_PROPERTY + "'"); if (isDiagnosticsEnabled()) { logDiagnostic("Trying to get log class from attribute '" + LOG_PROPERTY_OLD + "'"); if (isDiagnosticsEnabled()) { logDiagnostic("Trying to get log class from system property '" + LOG_PROPERTY + "'"); specifiedClass = getSystemProperty(LOG_PROPERTY, null); } catch (SecurityException e) { if (isDiagnosticsEnabled()) { logDiagnostic("No access allowed to system property '" + LOG_PROPERTY + "' - " + e.getMessage()); if (isDiagnosticsEnabled()) { logDiagnostic("Trying to get log class from system property '" + LOG_PROPERTY_OLD + "'"); specifiedClass = getSystemProperty(LOG_PROPERTY_OLD, null); } catch (SecurityException e) { if (isDiagnosticsEnabled()) { logDiagnostic("No access allowed to system property '" + LOG_PROPERTY_OLD + "' - " + e.getMessage());
if (isDiagnosticsEnabled()) { logDiagnostic("[ENV] Trying to get configuration for item " + property); if (isDiagnosticsEnabled()) { logDiagnostic("[ENV] Found LogFactory attribute [" + valueObj + "] for " + property); if (isDiagnosticsEnabled()) { logDiagnostic("[ENV] No LogFactory attribute found for " + property); String value = System.getProperty(property); if (value != null) { if (isDiagnosticsEnabled()) { logDiagnostic("[ENV] Found system property [" + value + "] for " + property); if (isDiagnosticsEnabled()) { logDiagnostic("[ENV] No system property found for property " + property); if (isDiagnosticsEnabled()) { logDiagnostic("[ENV] Security prevented reading system property " + property); if (isDiagnosticsEnabled()) { logDiagnostic("[ENV] No configuration defined for item " + property);
if (isDiagnosticsEnabled()) { try { ClassLoader logInterfaceClassLoader = getClassLoader(Log.class); msg.append(Log.class.getName()); msg.append("' visible."); if (isDiagnosticsEnabled()) { logDiagnostic(msg.toString()); if (isDiagnosticsEnabled()) { StringBuffer msg = new StringBuffer(); msg.append("Warning: bad log hierarchy. "); msg.append(badClass.getName()); msg.append("' does not implement the Log interface."); if (isDiagnosticsEnabled()) { logDiagnostic(msg.toString()); if (isDiagnosticsEnabled()) { StringBuffer msg = new StringBuffer(); msg.append("[WARNING] Log class '");
if (isDiagnosticsEnabled()) { logDiagnostic("Trying to get log class from attribute '" + LOG_PROPERTY + "'"); if (isDiagnosticsEnabled()) { logDiagnostic("Trying to get log class from attribute '" + LOG_PROPERTY_OLD + "'"); if (isDiagnosticsEnabled()) { logDiagnostic("Trying to get log class from system property '" + LOG_PROPERTY + "'"); specifiedClass = System.getProperty(LOG_PROPERTY); } catch (SecurityException e) { if (isDiagnosticsEnabled()) { logDiagnostic("No access allowed to system property '" + LOG_PROPERTY + "' - " + e.getMessage()); if (isDiagnosticsEnabled()) { logDiagnostic("Trying to get log class from system property '" + LOG_PROPERTY_OLD + "'"); specifiedClass = System.getProperty(LOG_PROPERTY_OLD); } catch (SecurityException e) { if (isDiagnosticsEnabled()) { logDiagnostic("No access allowed to system property '" + LOG_PROPERTY_OLD + "' - " + e.getMessage());
if (isDiagnosticsEnabled()) { try { ClassLoader logInterfaceClassLoader = getClassLoader(Log.class); msg.append(Log.class.getName()); msg.append("' visible."); if (isDiagnosticsEnabled()) { logDiagnostic(msg.toString()); if (isDiagnosticsEnabled()) { StringBuffer msg = new StringBuffer(); msg.append("Warning: bad log hierarchy. "); msg.append(badClass.getName()); msg.append("' does not implement the Log interface."); if (isDiagnosticsEnabled()) { logDiagnostic(msg.toString()); if (isDiagnosticsEnabled()) { StringBuffer msg = new StringBuffer(); msg.append("[WARNING] Log class '");
if (isDiagnosticsEnabled()) { logDiagnostic("Discovering a Log implementation..."); if (isDiagnosticsEnabled()) { logDiagnostic("Attempting to load user-specified log class '" + specifiedLogClassName + "'..."); if (isDiagnosticsEnabled()) { logDiagnostic( "No user-specified Log implementation; performing discovery" +
if (isDiagnosticsEnabled()) { logDiagnostic("[WARNING] the context classloader is not part of a" + " parent-child relationship with the classloader that" + if (isDiagnosticsEnabled()) { logDiagnostic( "Warning: the context classloader is an ancestor of the" +
throws LogConfigurationException { if (isDiagnosticsEnabled()) { logDiagnostic("Attempting to instantiate '" + logAdapterClassName + "'"); if (isDiagnosticsEnabled()) {
throws LogConfigurationException if (isDiagnosticsEnabled()) { logDiagnostic("Discovering a Log implementation..."); if (isDiagnosticsEnabled()) { logDiagnostic("Attempting to load user-specified log class '" + specifiedLogClassName + "'..."); if (isDiagnosticsEnabled()) { logDiagnostic( "No user-specified Log implementation; performing discovery" +
if (isDiagnosticsEnabled()) { logDiagnostic( "[WARNING] the context classloader is not part of a" if (isDiagnosticsEnabled()) { logDiagnostic( "Warning: the context classloader is an ancestor of the"
throws LogConfigurationException { if (isDiagnosticsEnabled()) { logDiagnostic("Attempting to instantiate '" + logAdapterClassName + "'"); + objectId(currentCL)); try { if (isDiagnosticsEnabled()) {