APISonar


org.neo4j.logging.Logger.log

> org > neo4j > logging > Logger > log
org APIs neo4j APIs logging APIs Logger APIs log APIs

Example 1
public void logVersions( Logger msgLog )
    {
        msgLog.log( "Store versions:" );
        visitStore( store ->
        {
            store.logVersions( msgLog );
            return false;
        } );
    }
Example 2
public void dump( Logger logger )
    {
        Map<String,String> configRaw = config.getRaw();
        if ( configRaw.isEmpty() )
        {
            logger.log( "No provided DBMS settings." );
            return;
        }
        logger.log( "DBMS provided settings:" );
        for ( Map.Entry<String,String> param : configRaw.entrySet() )
        {
            logger.log( "%s=%s", param.getKey(), config.obfuscateIfSecret( param ) );
        }
    }
Example 3
void logIdUsage( Logger logger )
    {
        logger.log( format( "%s: used=%s high=%s", getTypeDescriptor(), getNumberOfIdsInUse(), getHighestPossibleIdInUse() ) );
    }
Example 4
private final Logger logger;

    public Response<Void> incrementalBackup( RequestContext context )
    {
        try
        {
            logger.log("Incremental backup started...");
            return incrementalResponsePacker.packTransactionStreamResponse( context, null );
        } finally {
            logger.log("Incremental backup finished.");
        }
    }
Example 5
private final Logger log;

    private void stopDatabase()
    {
        if ( databaseContext != null )
        {
            Database database = databaseContext.getDatabase();
            log.log( "Shutting down '%s' database.", database.getDatabaseName() );
            database.stop();
            databaseContext = null;
        }
    }
Example 6
private final Logger msgLog;

    public void shutdown()
    {
        try
        {
            msgLog.log( "Shutdown started" );
            dataSource.database.getDatabaseAvailabilityGuard().shutdown();
            platform.getGlobalLife().shutdown();
        }
        catch ( LifecycleException throwable )
        {
            msgLog.log( "Shutdown failed", throwable );
            throw throwable;
        }
    }
Example 7
public void dump( Logger logger )
    {
        logger.log( getDiskSpace( databaseLayout ) );
        logger.log( "Storage files: (filename : modification date - size)" );
        MappedFileCounter mappedCounter = new MappedFileCounter();
        long totalSize = logStoreFiles( logger, "  ", databaseLayout.databaseDirectory(), mappedCounter );
        logger.log( "Storage summary: " );
        logger.log( "  Total size of store: " + bytesToString( totalSize ) );
        logger.log( "  Total size of mapped files: " + bytesToString( mappedCounter.getSize() ) );
    }
Example 8
public void logIdUsage( Logger msgLog )
    {
        msgLog.log( "Id usage:" );
        for ( CommonAbstractStore store : instantiatedRecordStores() )
        {
            store.logIdUsage( msgLog );
        }
    }
Example 9
private static void logBytes( Logger logger, String message, long value )
    {
        if ( value != OsBeanUtil.VALUE_UNAVAILABLE )
        {
            logger.log( message + bytesToString( value ) );
        }
    }
Example 10
private static boolean tryLockBlocking( Lock lock, UpdateLock managingLock, Logger logger )
    {
        try
        {
            return lock.tryLock( 1, TimeUnit.HOURS );
        }
        catch ( InterruptedException e )
        {
            logger.log( Thread.currentThread() + " ignoring interrupt while blocked on " + lock + " of " + managingLock );
        }
        return false;
    }
Example 11
public void dump( DiagnosticsPhase phase, Logger logger )
    {
        if ( phase.isInitialization() || phase.isExplicitlyRequested() )
        {
            logger.log( message );
            dump( logger );
        }
    }
Example 12
public void dump( DiagnosticsPhase phase, Logger logger )
    {
        StringBuilder builder = new StringBuilder();

        builder.append( "High Availability diagnostics\n" ).
                append( "Member state:" ).append( memberStateMachine.getCurrentState().name() ).append( "\n" ).
                append( "State machines:\n" );
        
        clusterClient.dumpDiagnostics( builder );
        logger.log( builder.toString() );
    }
Example 13
private final Logger log;

    public GraphDatabaseFacade createDatabase( String databaseName )
    {
        checkState( database == null, "Database is already created, fail to create another one." );
        log.log( "Creating '%s' database.", databaseName );
        DataSourceModule dataSource = new DataSourceModule( databaseName, platform, edition, procedures, graphDatabaseFacade );
        ClassicCoreSPI spi = new ClassicCoreSPI( platform, dataSource, log, dataSource.getCoreAPIAvailabilityGuard(), edition.threadToTransactionBridge );
        graphDatabaseFacade.init( spi, edition.threadToTransactionBridge, platform.config, dataSource.neoStoreDataSource.getTokenHolders() );
        platform.dataSourceManager.register( dataSource.neoStoreDataSource );
        database = graphDatabaseFacade;
        return database;
    }
Example 14
private final Logger log;

    public DatabaseContext createDatabase( String databaseName )
    {
        checkState( databaseContext == null, "Database is already created, fail to create another one." );
        log.log( "Creating '%s' database.", databaseName );
        DatabaseModule databaseModule = new DatabaseModule( databaseName, platform, edition, globalProcedures, graphDatabaseFacade );
        Database database = databaseModule.database;
        ClassicCoreSPI spi =
                new ClassicCoreSPI( platform, databaseModule, log, databaseModule.getCoreAPIAvailabilityGuard(), edition.getThreadToTransactionBridge() );
        graphDatabaseFacade.init( spi, edition.getThreadToTransactionBridge(), platform.getGlobalConfig(), database.getTokenHolders() );

        databaseContext = new DatabaseContext( database, graphDatabaseFacade );
        return databaseContext;
    }