In S2Container, you can get Logger instance by calling getLogger method of S2Logger class.
<?php require_once('S2Container/S2Container.php'); seasar\log\S2Logger::getLogger()->debug('debug message.');
In S2Container, you can get Logger instance which performs a log output by seasar\log\S2Logger class. S2Logger::getLogger method returns the instance of SimpleLogger as a default. LoggerFactory which generates Logger instance is set up as a property of seasar\Config class.
LOGGER_FACTORY.
The LoggerFactory class which generates Logger instance to be used is specified.
seasar\Config::$LOGGER_FACTORY = 'seasar\log\impl\SimpleLoggerFactory';LOG_LEVEL.
The level of a log output is set up.
seasar\Config::$LOG_LEVEL = seasar\log\impl\SimpleLogger::DEBUG;DEBUG_EVAL.
If a log output level is DEBUG, it logs the PHP Expression processed with the eval function.
seasar\Config::$DEBUG_EVAL = false;DEBUG_VERBOSE.
If a log output level is DEBUG, it logs some detail information.
seasar\Config::$DEBUG_VERBOSE = false;
SimpleLogger displays a log on standard output by a default. A log level can be set with the following six type. DEBUG, NOTICE, INFO, WARN, ERROR, FATAL
LOGGER_FACTORY.
The LoggerFactory of SimpleLogger class is SimpleLoggerFactory class.
seasar\Config::$LOGGER_FACTORY = 'seasar\log\impl\SimpleLoggerFactory';LOG_LEVEL.
The level of a log output is set up.
seasar\Config::$LOG_LEVEL = seasar\log\impl\SimpleLogger::DEBUG; seasar\Config::$LOG_LEVEL = seasar\log\impl\SimpleLogger::NOTICE; seasar\Config::$LOG_LEVEL = seasar\log\impl\SimpleLogger::INFO; seasar\Config::$LOG_LEVEL = seasar\log\impl\SimpleLogger::WARN; seasar\Config::$LOG_LEVEL = seasar\log\impl\SimpleLogger::ERROR; seasar\Config::$LOG_LEVEL = seasar\log\impl\SimpleLogger::FATAL;SIMPLE_LOG_FILE.
The log file is set up in the case of performing a log output to a file.
seasar\Config::$SIMPLE_LOG_FILE = null;
© Copyright The Seasar Foundation and the others 2005-2010, all rights reserved. |