protected synchronized void reassignBootLogger(boolean forceError)
    {
        // if the boot logger was already reassigned do nothing
        if(!bootLoggerIsReassigned)
        {
            Logger newBootLogger = null;
            String name = getBootLogger().getName();
            try
            {
                // 1. try to use a Logger instance based on the configuration files
                newBootLogger = createLoggerInstance(name);
            }
            catch(Exception e) {/*ignore*/}
            if(newBootLogger == null)
            {
                // 2. if no logging library can be found, use OJB's console logger
                newBootLogger = createPoorMansLogger_Boot();
            }
            if(getBootLogger() instanceof StringBufferLoggerImpl)
            {
                /*
                if the StringBuffer based Logger was used for OJB bootstrap process
                get the logging statement string and log it on the "real" Logger instance
                */
                StringBufferLoggerImpl strLogger = (StringBufferLoggerImpl) getBootLogger();
                String bootMessage = strLogger.flushLogBuffer();
                String eol = SystemUtils.LINE_SEPARATOR;
                if(forceError || strLogger.isErrorLog())
                {
                    newBootLogger.error("-- boot log messages -->" + eol + bootMessage);
                }
                else
                {
                    newBootLogger.info("-- boot log messages -->" + eol + bootMessage);
                }
            }
            bootLogger = newBootLogger;
            bootLoggerIsReassigned = true;
        }
    }
protected synchronized void reassignBootLogger ( boolean forceError ) { if ( ! bootLoggerIsReassigned ) { Logger newBootLogger = null ; String name = getBootLogger ( ) . getName ( ) ; try { newBootLogger = createLoggerInstance ( name ) ; } catch ( Exception e ) { } if ( newBootLogger == null ) { newBootLogger = createPoorMansLogger_Boot ( ) ; } if ( getBootLogger ( ) instanceof StringBufferLoggerImpl ) { StringBufferLoggerImpl strLogger = ( StringBufferLoggerImpl ) getBootLogger ( ) ; String bootMessage = strLogger . flushLogBuffer ( ) ; String eol = SystemUtils . LINE_SEPARATOR ; if ( forceError || strLogger . isErrorLog ( ) ) { newBootLogger . error ( "-- boot log messages -->" + eol + bootMessage ) ; } else { newBootLogger . info ( "-- boot log messages -->" + eol + bootMessage ) ; } } bootLogger = newBootLogger ; bootLoggerIsReassigned = true ; } }
@param forceError