Last active
February 19, 2018 12:14
-
-
Save bcaccinolo/86666e5e2cc7f8872f3b3434c449dc45 to your computer and use it in GitHub Desktop.
log prestashop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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