This module will benefit developers. Standard CMSMS installations will NOT benefit from this, as standard CMSMS logs will not go to Monolog.
Integrates https://github.com/Seldaek/monolog into CMS Made Simple
Post install, Monolog must be installed using Composer. Two choices:
cd modules/CMSMonolog composer update
composer require monolog/monolog
require_once __DIR__."/vendor/autoload.php";
After installation, logs are viewed in Site Admin -> CMS Monolog.
Logging is provided via the MLog static functions (levels are defined per Monolog)
| Level |
Method |
Parameters |
|---|---|---|
| Debug | MLog::d | (channel, debug message, variable1, variable2, ...); |
| Info | MLog::i | (channel, debug message, variable1, variable2, ...); |
| Warning | MLog::w | (channel, debug message, variable1, variable2, ...); |
| Error | MLog::e | (channel, debug message, variable1, variable2, ...); |
| Critical | MLog::c | (channel, debug message, variable1, variable2, ...); |
| Alert | MLog::a | (channel, debug message, variable1, variable2, ...); |
Example:
MLog::d(__METHOD__, "Starting process, parameters: ", $params);
If "Email on Error" is selected in settings (and your email is specified), then Error, Critical and Alert levels generate emails.
None
This software is provided as-is. Please read the text of the license for the full disclaimer.
Copyright © 2015, Mike Crowe <drmikecrowe@gmail.com>. All Rights Are Reserved.
Monolog is licensed under the MIT License - see the `LICENSE` file for details. You must agree to this license before using the module.