HOW TO : CORE
The log system is based on Log4J. You can see an example of Log4J configuration here.
The framework class in use for logging is JFWLogger. This class
uses some parameters, to work correctly; you can find the configuration of the parameters here.
There are 5 levels of logging:
- DEBUG: used for debugging the application. Normally these kind of messages are not visible in production systems.
- PROFILE: used for profiling the application.
- INFO: used for all the messages related to application status.
- WARNING: messages of this type indicate a situation that does not compromise the correct functionality of the application
but must be check by a system administrator.
- ERROR: used for report critical messages that compromise the correct functionality of the application.
Here is an example of use of the logger:
The log messages are visible in the log files set in log4j.xml
. Is also possible to use the
for see the log messages and for change the log level on the fly.