Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (! function_exist('logDebug')) {
- function logDebug($message)
- {
- $trace = debug_backtrace();
- $output = 'UserLog: ' . $trace[1]["class"] . '::' . $trace[1]['function'] . ' - ';
- if (is_array($message)) {
- $message = print_r($message, true);
- }
- $output .= $message;
- log_message('debug', $output);
- }
- }
- if (! function_exists('logError')) {
- function logError($message)
- {
- $trace = debug_backtrace();
- $output = 'UserLog: ' . $trace[1]["class"] . '::' . $trace[1]['function'] . ' - ';
- if (is_array($message)) {
- $message = print_r($message, true);
- }
- $output .= $message;
- log_message('error', $output);
- }
- }
Add Comment
Please, Sign In to add comment