SuiteCRM-Core/include/Smarty/plugins/function.log.php
Dillon-Brown 8e4cc94994 Squashed 'public/legacy/' content from commit 817a12dc0
git-subtree-dir: public/legacy
git-subtree-split: 817a12dc0c30c189f56d5cb1f7dc37a9631bdbe3
2021-03-31 15:37:32 +01:00

11 lines
378 B
PHP

<?php
use SuiteCRM\ErrorMessage;
function smarty_function_log($params, &$smarty) {
$from = $smarty->_plugins['function']['log'][1] . ':' . $smarty->_plugins['function']['log'][2];
$message = "log call at: $from - " . $params['msg'];
$level = isset($params['level']) ? $params['level'] : ErrorMessage::DEFAULT_LOG_LEVEL;
ErrorMessage::log($message, $level);
}