Tag

asynchronous logging

0 views collected around this technical thread.

Sanyou's Java Diary
Sanyou's Java Diary
Apr 17, 2025 · Backend Development

Why Does Log4j2 Async Logging Block Threads? Deep Dive & Solutions

Log4j2’s asynchronous logging can cause thread blocking when the Disruptor ring buffer fills, a problem explored through its architecture, root causes, and practical mitigation strategies such as dual‑track log classification, bytecode‑enhanced line‑level control, Maven plugins, and IDE integrations for dynamic log management.

Javaasynchronous logginglog4j2
0 likes · 13 min read
Why Does Log4j2 Async Logging Block Threads? Deep Dive & Solutions
Zhuanzhuan Tech
Zhuanzhuan Tech
Apr 16, 2025 · Backend Development

Analyzing Log4j2 Asynchronous Logging Blocking and Strategies for Fine-Grained Log Control

This article examines the causes of Log4j2 asynchronous logging blockage in high‑throughput Java services, explains the underlying Disruptor mechanics, and proposes a dual‑track logging architecture with compile‑time bytecode enhancement and IDE plugins for line‑level log activation.

JavaLogging StrategyObservability
0 likes · 15 min read
Analyzing Log4j2 Asynchronous Logging Blocking and Strategies for Fine-Grained Log Control
JD Tech Talk
JD Tech Talk
Dec 19, 2024 · Backend Development

Optimizing Log4j2 Asynchronous Logging: Configuration, Diagnosis, and Load‑Testing

This article presents a detailed case study of a severe service outage caused by Log4j2 asynchronous logging bottlenecks, explains step‑by‑step diagnostics of JVM, disk, and RingBuffer metrics, and demonstrates how adjusting log4j2.asyncQueueFullPolicy and log4j2.discardThreshold dramatically improves recovery time during load testing.

JavaPerformance Tuningasynchronous logging
0 likes · 14 min read
Optimizing Log4j2 Asynchronous Logging: Configuration, Diagnosis, and Load‑Testing
Top Architect
Top Architect
Dec 1, 2024 · Backend Development

Diagnosing Slow Asynchronous Log Printing in Java: From Mapping Overhead to Disruptor and JNI Analysis

This article investigates why a large number of quality‑check mappings cause severe latency in a Java service, traces the slowdown to excessive asynchronous log printing, explains the Disruptor‑based async logger internals, evaluates stack‑trace location handling and JNI overhead, and proposes practical configuration and code‑level fixes.

DisruptorJNIJava
0 likes · 20 min read
Diagnosing Slow Asynchronous Log Printing in Java: From Mapping Overhead to Disruptor and JNI Analysis
JD Tech
JD Tech
Jun 13, 2024 · Backend Development

Investigation of Log4j2 Asynchronous Logging Memory Growth and Mitigation Strategies

This article analyzes the memory increase observed after enabling Log4j2 asynchronous logging in Java services, examines root causes such as thread‑local reuse and large char[] allocations, and presents configuration and code changes—including disabling thread‑locals and limiting message size—to prevent heap growth and improve performance.

GCJVMJava
0 likes · 18 min read
Investigation of Log4j2 Asynchronous Logging Memory Growth and Mitigation Strategies
Top Architect
Top Architect
Mar 28, 2022 · Backend Development

Configuring Logback for Asynchronous Logging in Spring Boot and Performance Comparison

This article explains how to configure Logback in a Spring Boot application to separate logs by level, implement asynchronous logging with AsyncAppender, and compare performance using JMeter, demonstrating a tenfold throughput increase while providing detailed XML configuration examples and underlying implementation details.

JavaLogbackSpringBoot
0 likes · 9 min read
Configuring Logback for Asynchronous Logging in Spring Boot and Performance Comparison
Dada Group Technology
Dada Group Technology
Mar 25, 2022 · Backend Development

Optimizing Log4j2 Logging: Reducing Disk and CPU Usage, Asynchronous Logging, and Traceability with ThreadLocal and TTL

This article presents a comprehensive approach to optimizing Log4j2 logging in high‑traffic Java services by reducing disk and CPU consumption through log level control and pattern tuning, adopting asynchronous logging, and enabling end‑to‑end request traceability using ThreadLocal, TransmittableThreadLocal, and MDC techniques, supported by performance test results and practical recommendations.

JavaTTLasynchronous logging
0 likes · 14 min read
Optimizing Log4j2 Logging: Reducing Disk and CPU Usage, Asynchronous Logging, and Traceability with ThreadLocal and TTL
Architecture Digest
Architecture Digest
Oct 19, 2020 · Backend Development

Performance Comparison of Logback and Log4j2 Synchronous vs Asynchronous Logging

This article revisits a previous logback configuration test, expands the sample size and repeats the measurements using JMeter, JProfile, and New Relic APM to compare synchronous and asynchronous logging in Logback and Log4j2, revealing that asynchronous logging reduces log latency but only marginally improves overall TPS, while Log4j2’s async implementation can boost TPS up to six times.

JavaLogbackasynchronous logging
0 likes · 8 min read
Performance Comparison of Logback and Log4j2 Synchronous vs Asynchronous Logging
Architect's Tech Stack
Architect's Tech Stack
Sep 1, 2019 · Backend Development

Configuring Logback for Asynchronous Logging and Performance Testing in Spring Boot

This article explains how to configure Logback in a Spring Boot project to write logs to separate files by level, enable asynchronous logging to reduce I/O latency, and demonstrates a performance test that shows a ten‑fold throughput increase compared with synchronous logging.

JavaLogbackLogging Configuration
0 likes · 8 min read
Configuring Logback for Asynchronous Logging and Performance Testing in Spring Boot