Log4j

Log4j RollingFileAppender configuration example

Last Updated:

Log4j RollingFileAppender is an OutputStreamAppender that writes log messages to files, following a configured triggering policy about when a rollover (backup) should occur. It also has a configured rollover strategy about how to rollover the file.

Log4j ConsoleAppender Configuration Example

Last Updated:

Any logging application intended to print logging information to a console should use this org.apache.log4j.ConsoleAppender. ConsoleAppender is a very simple class designed to write logging …

SLF4j Vs Log4j – Which one is better?

Last Updated:

I have been asked this question multiple times, so I thought to write down my answer as this post in blog itself so others can …

Log4j – Reload Logging Levels on Runtime

Last Updated:

Excessive logging is a common cause of performance degrade of application. It is one of best practices to ensure proper logging within your Java EE …

Log4j SocketAppender and Socket Server Example

Last Updated:

Log4j is a simple and flexible logging framework. Logging equips the developer with detailed context for application failures. With log4j it is possible to enable …

Log4j JDBCAppender – Create Logs in Database

Last Updated:

Log4j is a simple and flexible logging framework. Logging equips the developer with detailed context for application failures. With log4j it is possible to enable …

Log4j XMLLayout – Create Logs in XML File

Last Updated:

Log4j is a simple and flexible logging framework. Logging equips the developer with detailed context for application failures. With log4j it is possible to enable …

Log4j HTMLLayout – Create Logs in HTML Format

Last Updated:

Log4j is a simple and flexible logging framework. Logging equips the developer with detailed context for application failures. With log4j it is possible to enable …

Log4j – Configure Appenders Programmatically

Last Updated:

Log4j is a simple and flexible logging framework. Logging equips the developer with detailed context for application failures. With log4j it is possible to enable …

Log4j Maven Configuration Example

Last Updated:

Log4j is a simple and flexible logging framework. Logging equips the developer with detailed context for application failures. With log4j it is possible to enable …

HowToDoInJava

A blog about Java and its related technologies, the best practices, algorithms, interview questions, scripting languages, and Python.