GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Tags · merlimat/slog
Tags
v0.10.1Select Log4j2 backend only when log4j-core is the active provider (#33) With log4j-api routed to SLF4J by log4j-to-slf4j (Spring Boot default), LogManager is present but log4j-core is not, so creating a logger failed with NoClassDefFoundError. Check that the active LoggerContext is a log4j-core one; otherwise fall through to SLF4J. Fixes #32 v0.10.0Clear the pooled event at release instead of the next claim (#19) event.clear() ran at the start of the next emit, so the last event's throwable graph, message and context-map values stayed reachable from the thread-local pool while the thread idled - an exception with a deep cause chain could be pinned indefinitely on a quiet thread. The clear now happens in the release finally, right after loggerConfig.log() returns, matching log4j2's own ReusableLogEventFactory.release() semantics (including the clear-then-unreserve order). This is safe by the same invariants that make pooling safe at all: in pooled mode every async consumer copies the event synchronously inside log(). The non-pooled by-reference path is outside the pooled-only guard and is never cleared. Clearing the event also clears the pooled context map, so attr values release too. Add Log4j2EventRetentionTest: WeakReferences on a thrown exception and an attr value must clear after the emit returns; without this change both stay strongly reachable and the test fails on timeout. Hot path unchanged in paired 3-fork JMH runs (17.88 -> 17.83 ops/us, same work relocated). v0.9.6Fix NPE in JsonTemplateLayout when using NDC resolver MutableLogEvent.clear() nulls the context stack, and since slog bypasses ThreadContext (setting context data directly), the stack stayed null. Log4j2's ThreadContextStackResolver.isResolvable() does not null-check the stack, causing an NPE with EcsLayout.json. Set the context stack to EMPTY_STACK after clear() to avoid this. v0.9.4Replace Supplier with ThrowingSupplier for checked exception support Introduce ThrowingSupplier<T> functional interface whose get() may throw checked exceptions. When a supplier fails at emit time, the exception message is captured as the attribute value instead of propagating, so a failing supplier never crashes the application. Centralize value resolution in Attr.resolveValue() used by all backends. Update README and Javadocs with examples. v0.9.3Add benchmark results and performance section to README Include disabled/enabled path charts, comparison summary, and instructions for running JMH benchmarks with async-profiler. Update backend description to reflect direct LogEvent construction bypassing ThreadContext. PreviousNext
|
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |