Code example for Logger

Methods: getLevel, setLevel

0
    static final Logger LOGGER = Logger.getLogger( "com.mongodb" );
 
    static final boolean D = Boolean.getBoolean( "DEBUG.MONGO" );
 
    static { 
        if ( LOGGER.getLevel() == null ){
            if ( D )
                LOGGER.setLevel( Level.ALL );
            else 
                LOGGER.setLevel( Level.WARNING );
        } 
    } 
 
    /** Little-endian */ 
    public static final ByteOrder ORDER = ByteOrder.LITTLE_ENDIAN;
 
    /** this size is set low to 4MB, but just serves as safe default */ 
    static final int MAX_OBJECT_SIZE = 1024 * 1024 * 4;
 
    /** default target size of an insert batch */ 
    static final int BATCH_INSERT_SIZE = 1024 * 1024 * 8;