Skip to content

Replace LowLevelLogUtil with a more sophisticated bootstrap logger #2204

Closed
@jvz

Description

@jvz

This was something I experimented with in the spi-updates branch. Essentially, the strategy used by the low-level logging util should be an interface that begins with a simple implementation that enqueues status data elements until this reference is replaced with a StatusLogger-backed version once StatusLogger has been initialized. This would drain the accumulated status data to the logger.

Such an API would look something like this (abbreviated):

@NullMarked
public interface BootstrapLogger {
    void log(
            final Level level,
            @Nullable final Marker marker,
            final String message,
            @Nullable final Throwable exception);
}

This could potentially be changed to log a StatusData object or a newly defined object for bootstrap messages. In any case, this API should be internal to log4j-api (i.e., not exported in the module) as it's only relevant for classes involved in bootstrapping.

Metadata

Metadata

Assignees

Labels

enhancementAdditions or updates to features

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions