mageguide/mglogger

添加自定义日志功能 mageguide.log

安装: 31

依赖者: 0

建议者: 0

安全: 0

星标: 0

关注者: 0

分支: 0

类型:magento2-module

1.0.3 2017-12-05 08:44 UTC

This package is not auto-updated.

Last update: 2024-09-22 13:08:29 UTC


README

添加自定义日志功能(mageguide.log)

使用示例

class mgLoggerExample
{
    /**
     * Logging instance
    */
    protected $_mglogger;

    /**
     * Constructor injection
     */
    public function __construct(
        \MageGuide\Mglogger\Logger\Logger $mglogger
    ) {
        $this->_mglogger = $mglogger;
    }

    /* Some function to call logger */
    public function doSomething()
    {
        $this->_mglogger->info('Info Test');
        $this->_mglogger->alert('Alert Test');
        $this->_mglogger->critical('Critical Test');
        $this->_mglogger->emergency('Emergency Test');
        $this->_mglogger->error('Error Test');
        $this->_mglogger->notice('Notice Test');
        $this->_mglogger->warning('Warning Test');
    }
}