Sometimes we need to redirect Maven console output to a file. Your favorite IDEs may not display all the console output. It is normal as some IDEs have a default configuration to show only the last part of the overall
How to configure Log4j to log to console
Okay, you wrote a lot of Log4j debug statements all over your codebase but do not want them to appear in QA and/or Production environment. How to do that? You need to configure Log4j by modifying log4j.xml. You could also use log4j.properties in place of log4j.xml but some advanced settings can only be set using the latter. Might as well use something that offers greater benefits.
How to Log to Separate Files in Log4j2
You have a batch application that reads, parses interface files (i.e., data files from other sources usually legacy systems), and inserts data into your batch application’s database. All logs are written to a single file. Now, the business starts a
How to Trace Program Flow using Log4j2
Do you not hate it to log method with “entry” and “exit” texts? Should you use “start” or “entry”? This article demonstrates how to use Log4j2 API to perform flow tracing without the need to provide texts.