コード例 #1
0
    /**
     * @return ezcLog
     */
    public static function getLogger()
    {
        if ( !isset(self::$logger) )
        {
            // Logger
            $filter           = new ezcLogFilter();
            $filter->severity = ezcLog::ERROR | ezcLog::INFO | ezcLog::WARNING;
            self::$logger     = ezcLog::getInstance();

            self::$logger->getMapper()->appendRule(new ezcLogFilterRule(
                $filter,
                new ezcLogUnixFileWriter( "var/log/", self::LOG_FILE, 157286400, 3 ),
                true )
            );
        }

        return self::$logger;
    }