Skip to content

Instantly share code, notes, and snippets.

@bcaccinolo
Last active Feb 19, 2018
Embed
What would you like to do?
log prestashop
if (!function_exists('monolog')) {
function monolog($var) {
$log = (new \Monolog\Logger('name'))->pushHandler(new \Monolog\Handler\ErrorLogHandler());
$log->addInfo("Running controller");
}
}
if (!function_exists('filelog')) {
function filelog($var) {
$log = (new \Monolog\Logger('name'));
$log->pushHandler(new \Monolog\Handler\StreamHandler(_PS_ROOT_DIR_.'/var/logs/out.log',
\Monolog\Logger::INFO));
$log->addInfo("Running controller");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment