@Override public void rotationError( Exception e, OutputStream outStream ) { FormattedLogProvider logProvider = internalLogBuilder.toOutputStream( outStream ); logProvider.getLog( StoreLogService.class ).info( "Rotation of internal log file failed:", e ); } } );
@Override public void info( String s ) { log.info( s ); }
@Override public void warn( String msg, Throwable thrown ) { log.warn( msg, thrown ); }
public MultipleIndexPopulator( IndexStoreView storeView, LogProvider logProvider, EntityType type, SchemaState schemaState ) { this.storeView = storeView; this.logProvider = logProvider; this.log = logProvider.getLog( IndexPopulationJob.class ); this.type = type; this.schemaState = schemaState; }
private void assertLogExistsForRecoveryOn( String labelAndProperty ) { logProvider.assertAtLeastOnce( inLog( IndexSamplingController.class ).debug( "Recovering index sampling for index %s", labelAndProperty ) ); }
@Override void invoke( AsyncLogTest state, Logger logger ) { logger.log( "a message" ); }
@Override public boolean isDebugEnabled() { return log.isDebugEnabled(); }
/** * Creates a {@link FormattedLog} instance that writes messages to an {@link OutputStream}. * * @param out An {@link OutputStream} to write to * @return A {@link FormattedLog} instance that writes to the specified OutputStream */ public static FormattedLog toOutputStream( OutputStream out ) { return new Builder().toOutputStream( out ); }
/** * Start creating a {@link FormattedLogProvider} with the specified zoneId for datestamps in the log * * @return a builder for a {@link FormattedLogProvider} * @param zoneId to use */ public static Builder withZoneId( ZoneId zoneId ) { return new Builder().withZoneId( zoneId ); }
/** * Start creating a {@link FormattedLog} with the specified log {@link Level} as a default. * Use {@link Builder#toOutputStream} to complete. * * @param level the log level to use as a default * @return a builder for a {@link FormattedLog} */ public static Builder withLogLevel( Level level ) { return new Builder().withLogLevel( level ); }
/** * Set the zoneId for datestamps in the log * * @return this builder */ public Builder withUTCZoneId() { return withZoneId( ZoneOffset.UTC ); }
/** * Start creating a {@link FormattedLogProvider} with UTC timezone for datestamps in the log * * @return a builder for a {@link FormattedLogProvider} */ public static Builder withUTCTimeZone() { return new Builder().withUTCZoneId(); }
/** * Start creating a {@link FormattedLog} using the specified object to synchronize on. * Use {@link Builder#toOutputStream} to complete. * * @param lock the object to synchronize on * @return a builder for a {@link FormattedLog} */ public static Builder usingLock( Object lock ) { return new Builder().usingLock( lock ); }
@Override public void rotationCompleted( OutputStream newStream ) { FormattedLogProvider logProvider = internalLogBuilder.toOutputStream( newStream ); logProvider.getLog( StoreLogService.class ).info( "Rotated internal log file" ); }
TransportSelectionHandler( BoltChannel boltChannel, SslContext sslCtx, boolean encryptionRequired, boolean isEncrypted, LogProvider logging, BoltProtocolFactory boltProtocolFactory ) { this.boltChannel = boltChannel; this.sslCtx = sslCtx; this.encryptionRequired = encryptionRequired; this.isEncrypted = isEncrypted; this.logging = logging; this.boltProtocolFactory = boltProtocolFactory; this.log = logging.getLog( TransportSelectionHandler.class ); }
@Override public void outputFileCreated( OutputStream newStream ) { FormattedLogProvider logProvider = internalLogBuilder.toOutputStream( newStream ); logProvider.getLog( StoreLogService.class ).info( "Opened new internal log file" ); rotationListener.accept( logProvider ); }