Log4j by default can log messages with five priority levels.
- Use
debug
to write debugging messages which should not be printed when the application is in production. - Use
info
for messages similar to the "verbose" mode of many applications. - Use
warn
for warning messages which are logged to some log but the application is able to carry on without a problem. - Use
error
for application error messages which are also logged to some log but, still, the application can hobble along. Such as when some administrator-supplied configuration parameter is incorrect and you fall back to using some hard-coded default value. - Use
fatal
for critical messages, after logging of which the application quits abnormally.
No comments:
Post a Comment