0
0
mirror of https://github.com/salesagility/SuiteCRM.git synced 2024-11-21 23:47:57 +00:00
salesagility_SuiteCRM/include/Smarty/plugins/function.log.php
2023-07-18 15:54:17 +01:00

12 lines
318 B
PHP

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