Tagged articles
asynchronous logging
25 articles · Page 1 of 1
The article analyzes why logging in modern Spring Boot microservices shifts from a simple debug tool to a critical data pipeline, compares Logback and Log4j2 async setups, reveals hidden costs and risks, and walks through eight concrete production scenarios to build a controllable, high‑performance logging architecture.
KubernetesLog4j2Logback
0 likes · 25 min read

The article explains how to implement a zero‑intrusion, AOP‑based global API logging solution for Spring Boot applications, addressing common issues of manual logging such as code clutter, missing logs, inconsistent formats, privacy leaks, and performance overhead by using repeatable request wrappers, configurable filters, structured DTOs, asynchronous persistence, and comprehensive trace and desensitization utilities.
AOPAPI LoggingRequest Wrapper
0 likes · 19 min read

The article explains why effective logging is crucial for Java applications, compares proper and improper logging practices with SLF4J and Logback, and provides fourteen concrete best‑practice guidelines—including correct logger setup, level usage, placeholders, asynchronous and structured logging—to avoid performance degradation and security risks.
JavaLogbackSLF4J
0 likes · 14 min read

This article presents ten practical rules for producing clean, searchable, and performance‑friendly logs in Java applications, covering unified formatting, stack traces, log levels, complete parameters, data masking, asynchronous writing, traceability, dynamic log levels, structured storage, and intelligent monitoring with concrete code snippets and configuration examples.
Best PracticesLogbackLogging
0 likes · 10 min read

This article explains how to build a high‑performance asynchronous logging system for Go web services using channels and middleware, covering both gRPC and Gin implementations, a log‑processing engine, performance‑tuning tips, and measured latency and CPU improvements.
ChannelsGinasynchronous logging
0 likes · 7 min read

This article examines Log4j2 asynchronous logging bottlenecks, explains the underlying Disruptor queue mechanics, identifies root causes of thread blocking, and presents practical strategies—including queue tuning, log classification, bytecode instrumentation, and IDE plugins—to achieve fine‑grained, performant log control.
DisruptorIDE pluginLog4j2
0 likes · 12 min read

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.
JavaLog4j2asynchronous logging
0 likes · 13 min read

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.
JavaLog4j2Logging Strategy
0 likes · 15 min read

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.
ConfigurationJavaLog4j2
0 likes · 14 min read

This article analyzes a severe service‑availability drop caused by Log4j2 asynchronous logging bottlenecks, explains how configuring log4j2.asyncQueueFullPolicy=Discard and log4j2.discardThreshold=ERROR mitigates the issue, details the investigation steps, performance tests, and provides practical recommendations for robust backend logging.
Java backendLog4j2asynchronous logging
0 likes · 15 min read

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


JD TechJun 13, 2024 · Backend Development
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.
JVMJavaasynchronous logging
0 likes · 18 min read

This article analyzes a performance bottleneck caused by synchronous Log4j2 logging, demonstrates how converting to asynchronous logging with AsyncLogger or AsyncAppender dramatically reduces response time, increases TPS, and lowers CPU usage, and provides detailed configuration examples and best‑practice guidelines.
Log4j2asynchronous logginglogging configuration
0 likes · 17 min read

Facing massive log volume in JD.com’s shopping cart service, we reduced disk consumption, CPU load, and improved request latency by applying Log4j2 log level filtering, asynchronous logging with AsyncLogger, and TTL‑based thread‑local context propagation, while providing detailed metrics, configuration steps, and best‑practice recommendations.
Log4j2TTLThreadLocal
0 likes · 14 min read

Learn how to configure Logback in Spring Boot to separate logs by level, implement asynchronous logging for reduced I/O latency, and verify performance gains—up to tenfold throughput improvement—using JMeter tests on a six‑core, 8 GB server, with detailed XML snippets and code explanations.
asynchronous loggingperformance testingspring-boot
0 likes · 11 min read

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

This article explains how to configure Logback for asynchronous logging in Spring Boot, separates logs by level, reduces disk I/O, and demonstrates a performance test that shows a ten‑fold throughput increase compared to synchronous logging.
Logbackasynchronous logginglogging configuration
0 likes · 10 min read

This article explains how to configure Logback in Spring Boot to separate logs by level, use asynchronous appenders to reduce I/O latency, and demonstrates a performance test showing a ten‑fold throughput increase, while also detailing the underlying async logging mechanism.
Logbackasynchronous loggingperformance
0 likes · 9 min read

Log4j2, the modern successor to Logback and Log4j 1, offers dramatically superior asynchronous performance, zero‑GC operation, flexible configuration formats, powerful parameter formatting, lazy logging via lambdas, and extensive appender support, making it the top choice for Java logging in high‑throughput applications.
Java loggingLog4j2asynchronous logging
0 likes · 11 min read

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.
JavaLog4j2Logback
0 likes · 8 min read

Through extensive JMeter and APM testing on a 6‑core, 8 GB server, this article reveals that switching Logback from synchronous to asynchronous logging yields minimal TPS improvement, explains why, and demonstrates that Log4j2’s async implementation can achieve up to six‑fold performance gains.
JavaLog4j2Logback
0 likes · 8 min read

This article explains how to configure Logback in a Spring Boot application to separate logs by level into different files, implement asynchronous logging to reduce disk I/O, and demonstrates a performance test showing a ten‑fold throughput increase, while also detailing the underlying async mechanism.
JavaLogbackSpring Boot
0 likes · 10 min read

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.
LogbackSpringBootasynchronous logging
0 likes · 8 min read

This article explains why a task center is essential for merchants, outlines its goals, and details the backend architecture—including atomic APIs, Apollo-driven dynamic configuration, idempotent control, workflow orchestration, caching, and asynchronous logging—while also sharing future enhancements.
Dynamic ConfigurationIdempotencyasynchronous logging
0 likes · 8 min read

An in‑depth performance comparison of Logback and Log4j2 shows how asynchronous logging and the Disruptor queue dramatically improve throughput, with benchmark data across various hardware, configuration tips, and a look at underlying queue implementations such as ArrayBlockingQueue versus Disruptor.
DisruptorLog4j2Logback
0 likes · 8 min read
