Tagged articles
Java logging
14 articles · Page 1 of 1
A benchmark shows log4j2 can be roughly twice as fast as logback, especially when thread count approaches twice the CPU cores, while logging method names and line numbers significantly degrade throughput; the article explains the underlying reasons, testing setup, and provides practical configuration and usage guidelines for both frameworks in Java and Spring projects.
Java loggingLog4j2Logback
0 likes · 16 min read


ITPUBJun 7, 2026 · Operations
When a teammate struggled to find errors in massive Java service logs, the author demonstrated a step‑by‑step series of grep tricks—locking time and identifiers, chaining filters, using line numbers, context options, real‑time tailing, recursive search, and shell aliases—to turn chaotic log streams into precise, actionable insights.
Java loggingLinuxcommand line
0 likes · 12 min read

This article explains how to eliminate manual logging of user and order identifiers in Java e‑commerce services by using Log4j2 placeholders, ThreadLocal, MDC, a custom @UserLog annotation, and Spring AOP to automatically enrich log messages with these contextual fields.
Java loggingLog4j2MDC
0 likes · 9 min read

This article compares the performance of Logback and Log4j2, presents benchmark results under various thread counts, explains their relationship with SLF4J, and provides step‑by‑step configuration and usage instructions for both frameworks in Spring Boot projects, including best practices and sample code.
Java loggingLogbackSLF4J
0 likes · 15 min read

The article explains why logging is essential for problem tracing, status monitoring, and security auditing, introduces Log4j, Log4j2, and Logback components and configuration files, demonstrates usage with Maven dependencies and code snippets, evaluates their synchronous and asynchronous performance, and offers practical recommendations for production environments.
Java loggingLog4j2Logback
0 likes · 28 min read

Learn how to protect personal data in Spring Boot 3.2.5 applications by customizing Logback's PatternLayout and appender to mask fields such as name, phone, password, and email, with step‑by‑step code examples, configuration snippets, and handling of object logging.
Java loggingLogbackSpring Boot
0 likes · 7 min read

This article compares the performance of Log4j2 and Logback in Java, explains their relationship with SLF4J, presents benchmark results under various thread counts, and provides detailed configuration and usage guidelines for both Spring Boot and plain Java projects.
Java loggingLog4j2Logback
0 likes · 14 min read

This article provides a detailed tutorial on Log4j2, covering how to add Maven dependencies, write XML configuration files, use PatternLayout placeholders, configure various Appenders and Filters, set up Loggers, enable asynchronous logging, and fine‑tune rolling file policies for Java backend applications.
Java loggingPatternLayoutRollingFile
0 likes · 21 min read

The article explains how the delegation pattern—combining a fixed core processing path with extensible open interfaces—underpins Java toolkits such as SLF4J, JDBC, and Dubbo, illustrating its implementation steps, when to apply it, and pitfalls like reverse delegation loops.
Apache DubboDesign PatternsJDBC
0 likes · 17 min read

This article explains why Logback is preferred over Log4j, shows how to add the necessary Maven dependencies, describes default and custom configurations via logback‑spring.xml, details logger, appender, layout, rolling policies and filters, and provides best practices for efficient logging in Spring Boot applications.
Java loggingLogbackSLF4J
0 likes · 21 min read

Developers often flood systems with INFO logs, causing massive files that strain operations; this article outlines practical log‑slimming strategies—printing only essential logs, merging entries, using abbreviations, and context‑aware level switches—illustrated with a concrete case that reduced daily log volume from 5 GB to under 1 GB.
Java loggingbackend operationscode refactoring
0 likes · 7 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 compares Log4j2 with older Java logging frameworks, highlighting its superior asynchronous performance, zero‑GC design, flexible parameter formatting, simplified configuration options, and practical usage examples, ultimately showing why it should replace Logback and Log4j1 in modern applications.
Java loggingLog4j2async logging
0 likes · 14 min read

This article explains the structure and behavior of System.out.println in Java, covering the System class, the out field, println method, output redirection, performance implications, comparison with logging frameworks, static import shortcuts, and the related System.err and System.in streams.
Java loggingoutput redirectionperformance
0 likes · 8 min read
