Last active
August 29, 2015 14:05
-
-
Save krismas/c321a4b3e29675424526 to your computer and use it in GitHub Desktop.
A small MODX Snippet / Output Filter to log message to the MODX error log
This file contains hidden or 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
<?php | |
/** | |
* log : A small MODX Snippet / Output Filter to log message to the MODX error log | |
* | |
* @version : 1.0.0 | |
* @see : https://gist.github.com/krismas/c321a4b3e29675424526 | |
* @name : log.php | |
* @author : [email protected] | |
* @usage : [[*aTV:log]] | |
* [[+aPH:log]] | |
* [[log?msg=`A message...`]] | |
* | |
* @history : 19/08/14 - 1.0.0 - Initial revision | |
*/ | |
$msg = ($input ? $input : $modx->getOption('msg', $scriptProperties,'Empty message!')); | |
$modx->log(modX::LOG_LEVEL_ERROR, '[#'.$modx->resource->get('id').'] '.$msg); | |
return ''; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment