/** * Creates the log manager that will use the given context object. * * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects */ public function __construct(\Aimeos\MShop\Context\Item\Iface $context) { parent::__construct($context); $this->setResourceName('db-log'); $config = $context->getConfig(); /** madmin/log/manager/standard/loglevel * Sets the severity level for messages to be written to the log * * Manager, provider and other active components write messages about * problems, informational and debug output to the logs. The messages * that are actually written to the logs can be limited with the * "loglevel" configuration. * * Available log levels are: * * Emergency (0): system is unusable * * Alert (1): action must be taken immediately * * Critical (2): critical conditions * * Error (3): error conditions * * Warning (4): warning conditions * * Notice (5): normal but significant condition * * Informational (6): informational messages * * Debug (7): debug messages * * The "loglevel" configuration option defines the severity of messages * that will be written to the logs, e.g. a log level of "3" (error) * will allow all messages with an associated level of three and below * (error, critical, alert and emergency) to be written to the storage. * Messages with other log levels (warning, notice, informational and * debug) would be discarded and won't be written to the storage. * * The higher the log level, the more messages will be written to the * storage. Keep in mind that a higher volume of messages will slow * down the system and the debug log level shouldn't be used in * production environments with a high number of visitors! * * @param integer Log level number * @since 2014.03 * @category Developer * @category User */ $this->loglevel = $config->get('madmin/log/manager/standard/loglevel', \Aimeos\MW\Logger\Base::WARN); $this->requestid = md5(php_uname('n') . getmypid() . date('Y-m-d H:i:s')); }
/** * Creates the cache manager that will use the given context object. * * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects */ public function __construct(\Aimeos\MShop\Context\Item\Iface $context) { parent::__construct($context); $this->setResourceName('db-cache'); }