
io.tracee.contextlogger.builder.ContextLoggerBuilderImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tracee-context-logger-impl Show documentation
Show all versions of tracee-context-logger-impl Show documentation
Please refer to https://github.com/holisticon/tracee.
The newest version!
package io.tracee.contextlogger.builder;
import io.tracee.contextlogger.builder.gson.TraceeGsonContextLogBuilder;
class ContextLoggerBuilderImpl implements ContextLoggerBuilder {
private final ContextLoggerConfiguration contextLoggerConfiguration;
private ConfigBuilderImpl configBuilder = new ConfigBuilderImpl(this);
public ContextLoggerBuilderImpl(ContextLoggerConfiguration contextLoggerConfiguration) {
this.contextLoggerConfiguration = contextLoggerConfiguration;
}
@Override
public ConfigBuilder config() {
return configBuilder;
}
@Override
public ContextLogger build() {
return new TraceeContextLogger(createGsonLogBuilder(), contextLoggerConfiguration);
}
/**
* Creates a TraceeGsonContextLogBuilder instance which can be used for creating the log message.
*
* @return An instance of TraceeGsonContextLogBuilder
*/
private TraceeGsonContextLogBuilder createGsonLogBuilder() {
TraceeGsonContextLogBuilder tmpTraceeGsonContextLogBuilder = new TraceeGsonContextLogBuilder();
tmpTraceeGsonContextLogBuilder.setWrapperClasses(contextLoggerConfiguration.getWrapperClasses());
tmpTraceeGsonContextLogBuilder.setManualContextOverrides(configBuilder.getManualContextOverrides());
tmpTraceeGsonContextLogBuilder.setProfile(this.configBuilder.getProfile());
return tmpTraceeGsonContextLogBuilder;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy