This content has been marked as final. Show 1 reply
You should not use System.out.println in either case. In your code use getLogger:
Modify both Log4j.xml files related to each playback. For OLT the agent log file will be saved in C:\OracleATS\logs
getLogger().info("This is information"); getLogger().warn("This is a warning"); getLogger().error("This is an error");
Load OLT: C:\OracleATS\Agent
Then whenever you need, change priority values in log4j.xml to DEBUG, WARN, or INFO. Setting to DEBUG will log all three, WARN will log only WARN and INFO, and INFO just info. Make sure the category is not commented out by surrounding <!-- and -->.
There are 5 or 6 log4j examples in each products dir called e.g. log4jDebug.xml and log4jHTTP.xml that you must rename to only log4j.xml (backup your original). If you look close at those examples you can see how instead of logging every internal jagent modules with the "<root>" category, you can change the category to only log things from only script code or, for example, only HTTP request headers. You will find if you put debug in the "<root>" category that your log file will grow fast.
<root> <priority value="DEBUG"/> <appender-ref ref="AGENTFILE" /> <appender-ref ref="CONSOLE" /> </root>