How to implement log4j such that some desired loggers are not shown at PRODUCTION environment, but will show at test and acceptance environment.
Is it possible to do by using log4j only?
How to implement log4j such that some desired loggers are not shown at PRODUCTION environment, but will show at test and acceptance environment.
Is it possible to do by using log4j only?
You Can use log4j for Production. But make sure that there is minimum usage of log in production. As less info and fatal can lead to less logger in production.
Lesser the logging faster the process, More the logging ,more verbose will be the server.
use warn precisely and only when there is any transaction happening with Database.
Hope it could help you!!!
You can work with the log4j defaults logs Levels, for example use minimal level DEBUG for test or acceptance environment and INFO for production.
Besides, you can implement your own custom log levels https://logging.apache.org/log4j/2.x/manual/customloglevels.html