Tagged articles

Java logging

13 articles · Page 1 of 1
ITPUB
ITPUB
Jun 7, 2026 · Operations

Speed Up Log Searching with Powerful Grep Combos: A Live Demo

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 loggingLinuxTroubleshooting
0 likes · 12 min read
Speed Up Log Searching with Powerful Grep Combos: A Live Demo
Architect's Tech Stack
Architect's Tech Stack
Sep 25, 2025 · Backend Development

Auto‑Inject UserId and OrderId into Logs with Spring AOP and MDC

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.

AnnotationJava loggingMDC
0 likes · 9 min read
Auto‑Inject UserId and OrderId into Logs with Spring AOP and MDC
Pan Zhi's Tech Notes
Pan Zhi's Tech Notes
Feb 12, 2025 · Backend Development

Comprehensive Guide to Log Configuration and Performance Comparison of Major Java Logging Frameworks

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 loggingLogbackSLF4J
0 likes · 28 min read
Comprehensive Guide to Log Configuration and Performance Comparison of Major Java Logging Frameworks
Selected Java Interview Questions
Selected Java Interview Questions
Sep 17, 2023 · Backend Development

Comprehensive Guide to Configuring Log4j2: Dependencies, Configuration Files, PatternLayout, Appenders, Loggers, and Asynchronous Logging

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.

ConfigurationJava loggingPatternLayout
0 likes · 21 min read
Comprehensive Guide to Configuring Log4j2: Dependencies, Configuration Files, PatternLayout, Appenders, Loggers, and Asynchronous Logging
Architect's Tech Stack
Architect's Tech Stack
Aug 16, 2022 · Backend Development

Using Logback and SLF4J for Logging in Spring Boot

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.

ConfigurationJava loggingLogback
0 likes · 21 min read
Using Logback and SLF4J for Logging in Spring Boot
dbaplus Community
dbaplus Community
Aug 7, 2022 · Operations

How to Slim Down Application Logs: Practical Techniques and Real‑World Case Study

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.

Code RefactoringJava loggingbackend operations
0 likes · 7 min read
How to Slim Down Application Logs: Practical Techniques and Real‑World Case Study
Programmer DD
Programmer DD
Apr 18, 2021 · Backend Development

Why Log4j2 Beats Logback: Performance, Zero‑GC, and Advanced Features

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.

Asynchronous LoggingJava logginglazy logging
0 likes · 11 min read
Why Log4j2 Beats Logback: Performance, Zero‑GC, and Advanced Features
Code Ape Tech Column
Code Ape Tech Column
Apr 16, 2021 · Backend Development

Why Log4j2 Beats Logback and Log4j1: Performance, Configuration, and Advanced Features

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.

ConfigurationJava loggingLazy Evaluation
0 likes · 14 min read
Why Log4j2 Beats Logback and Log4j1: Performance, Configuration, and Advanced Features
Programmer DD
Programmer DD
Sep 2, 2019 · Fundamentals

What Exactly Happens When You Call System.out.println() in Java?

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 loggingPerformanceoutput redirection
0 likes · 8 min read
What Exactly Happens When You Call System.out.println() in Java?