public function __construct() { $format = ''; $format .= 'Timestamp: %timestamp%' . PHP_EOL; $format .= 'Priority: %priorityName% (%priority%)' . PHP_EOL; $format .= 'Message: %message%' . PHP_EOL; $format .= PHP_EOL; $format .= 'Hostname: ' . php_uname('n') . PHP_EOL; $format .= 'APPLICATION_ENV: ' . APPLICATION_ENV . PHP_EOL; $format .= 'APPLICATION_PATH: ' . APPLICATION_PATH . PHP_EOL; $format .= PHP_EOL; $format .= 'Trace:' . PHP_EOL; $format .= '%trace%' . PHP_EOL; $format .= PHP_EOL; $format .= '$_SERVER:' . PHP_EOL; $format .= var_export($_SERVER, true) . PHP_EOL; $format .= PHP_EOL; $format .= '$_REQUEST:' . PHP_EOL; $format .= var_export($_REQUEST, true) . PHP_EOL; $format .= PHP_EOL; $format .= '$_GET:' . PHP_EOL; $format .= var_export($_GET, true) . PHP_EOL; $format .= PHP_EOL; $format .= '$_POST:' . PHP_EOL; $format .= var_export($_POST, true) . PHP_EOL; $format .= PHP_EOL; $format .= '$_COOKIE:' . PHP_EOL; $format .= var_export($_COOKIE, true) . PHP_EOL; $format .= PHP_EOL; $format .= '$_ENV:' . PHP_EOL; $format .= var_export($_ENV, true) . PHP_EOL; $format .= PHP_EOL; parent::__construct($format); }
/** * Class constructor * * @param null|string $format Format specifier for log messages * @throws \Zend_Log_Exception */ public function __construct($format = null) { if (null === $format) { $format = static::DEFAULT_FORMAT; } parent::__construct($format); }
/** * overwritten parent constructor to load configuration, calls parent constructor * * supported configuration keys: * logruntime => prepend time passed since request started * logdifftime => prepend time passed since last log message * * @param string $format */ function __construct(string $format = null) { parent::__construct($format); if (!self::$_prefix) { self::$_prefix = Tinebase_Record_Abstract::generateUID(5); } if (self::$_starttime === NULL) { self::$_starttime = Tinebase_Core::get(Tinebase_Core::STARTTIME); if (self::$_starttime === NULL) { self::$_starttime = microtime(true); } } if (self::$_logruntime === NULL || self::$_logdifftime === NULL) { $config = Tinebase_Core::getConfig(); if ($config->logger->logruntime) { self::$_logruntime = true; } else { self::$_logruntime = false; } if ($config->logger->logdifftime) { self::$_logdifftime = true; } else { self::$_logdifftime = false; } } }
/** * Class constructor * * @param null|string $format Logging Format */ public function __construct($format = null) { $configFormat = Mage::helper('firegento_logger')->getLoggerConfig('general/format'); if ($configFormat) { $format = str_replace('\\n', PHP_EOL, $configFormat); } if (!$format) { $format = self::DEFAULT_FORMAT; } parent::__construct($format . PHP_EOL); }