[TLOG-5] Improvement of sample code in README.md Created: 14/Oct/11 Updated: 07/Jun/14 Resolved: 17/Oct/11
|Reporter:||Jingguo Yao||Assignee:||Alexander Taggart|
README.md uses the following code to show the usage of tools.logging.
If log4j.rootLogger in the given log4j.properties is updated to "ERROR, A1". "(divide 10 0)" won't evaluate "(error ex "There was an error in calculation")". The reason is that INFO logging level is lower than ERROR logging level. So the info macro will not evaluate "(/ one two)" since the specific INFO logging level is not in effect.
New tools.logging users often expect "(divide 10 0)" to produce logging with ERROR level. They are confused with the above behaviour. So I suggest to make some change to the sample code. Maybe the following code: