From: Markku Nikkanen <markku.nikka...@gmail.com>
Date: Thu, 18 Oct 2012 03:59:02 -0700 (PDT)
Local: Thurs, Oct 18 2012 6:59 am
Subject: How should logging levels work defined in logger.xml?
following tutorial lags of information. It does not explain well enough how http://www.playframework.org/documentation/2.0.4/SettingsLogger What I would expect to happen with following configurations is to have ONLY 2012-10-18 13:13:50,164 - [ERROR] - from play in main Why I make this conclusion is based on following code block. Play logger is <logger name="play" level="ERROR"/> Only following line matches to above definition: Logger.of("play").error("play error"); This is how configurations are read: java -Dlogger.file=logger.xml -cp ------------------------------------------------------------ Following logging are set to file which inherits GlobalSettings public void onStart(Application app) { Logger.trace("global trace"); Logger.debug("global debug"); Logger.info("global info"); Logger.warn("global warn"); Logger.error("global error"); Logger.of("application").trace("application trace"); Logger.of("application").debug("application debug"); Logger.of("application").info("application info"); Logger.of("application").warn("application warn"); Logger.of("application").error("application error"); Logger.of("play").trace("play trace"); Logger.of("play").debug("play debug"); Logger.of("play").info("play info"); Logger.of("play").warn("play warn"); Logger.of("play").error("play error"); ------------------------------------------------------------ I have removed application level logger from following configurations to <fileNamePattern>${application.home}/logs/play_log.%d{yyyy-MM-dd}.log</file NamePattern> <logger name="play" level="ERROR"/> <root level="WARN"> ------------------------------------------------------------ Following Application.conf lines seems to have clear affect what logging # Root logger: #logger.root=INFO # Logger used by the framework: #logger.play=INFO # Logger provided to your application: #logger.application=WARN See how logs/play.log.log file contains lots of lines that should not be 2012-10-18 13:13:50,164 - [DEBUG] - from application in main 2012-10-18 13:13:50,164 - [INFO] - from application in main 2012-10-18 13:13:50,164 - [WARN] - from application in main 2012-10-18 13:13:50,164 - [ERROR] - from application in main 2012-10-18 13:13:50,164 - [DEBUG] - from application in main 2012-10-18 13:13:50,164 - [INFO] - from application in main 2012-10-18 13:13:50,164 - [WARN] - from application in main 2012-10-18 13:13:50,164 - [ERROR] - from application in main 2012-10-18 13:13:50,164 - [INFO] - from play in main 2012-10-18 13:13:50,164 - [WARN] - from play in main 2012-10-18 13:13:50,164 - [ERROR] - from play in main You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||