log4j is a very popular logging library for Java development. It provides convenient and flexible logging mechanism as well as fast performance.
- Configure the root logger.
- Configure individual loggers (if needed).
- Specify appenders.
- Specify message layout.
- t: name of the current executing thread.
- p: priority
- c: category
- m: log message.
- n: line separator character.
- Using .properties file.
- Using XML file.
- Using Java code programmatically.