We use custom logger to know the workflow information and debugging purpose.
In order to create our own custom log file we have to add code to log4j.xml. This xml file will there at C:\Teamworks7\process-center\resources\log4j.xml.
In logger we have 7 levels those are DEBUG, ERROR, WARN, INFO, FATAL, ALL, OFF. In this level default is the DEBUG level and if you want to turn off the logging frame work OFF have to use. ALL is the lowest possible rank to turn on all logging.
In log4j.xml we have two tags
1. appender
2.category
Category will the level of output suppose if you mention DEBUG level in category you will see all the all logging level output from DEBUG to FATAL. Suppose if you mention WARN then you will see all the logging level output from WARN to FATAL.
In custom log we have to write our own appender and category where we have to give our own logger file.
In order to create our own custom log file we have to add code to log4j.xml. This xml file will there at C:\Teamworks7\process-center\resources\log4j.xml.
In logger we have 7 levels those are DEBUG, ERROR, WARN, INFO, FATAL, ALL, OFF. In this level default is the DEBUG level and if you want to turn off the logging frame work OFF have to use. ALL is the lowest possible rank to turn on all logging.
In log4j.xml we have two tags
1. appender
2.category
Category will the level of output suppose if you mention DEBUG level in category you will see all the all logging level output from DEBUG to FATAL. Suppose if you mention WARN then you will see all the logging level output from WARN to FATAL.
In custom log we have to write our own appender and category where we have to give our own logger file.
No comments:
Post a Comment