Definition at line 39 of file error_log_manager.inc.
◆ enableLogging()
static ErrorLogManager::enableLogging |
( |
| ) |
|
|
static |
Definition at line 52 of file error_log_manager.inc.
58 set_exception_handler(array(
"ErrorLogManager",
"exceptionHandler"));
static $loggingDestination
static $errorPageTemplate
static getValue($component, $name)
Retrieve the value of the specified Setting.
◆ exceptionHandler()
static ErrorLogManager::exceptionHandler |
( |
|
$exception | ) |
|
|
static |
Definition at line 134 of file error_log_manager.inc.
142 $errMsg = $exception->getMessage();
143 $errLevel = $exception->getCode();
144 $errFile = $exception->getFile();
145 $errLine = $exception->getLine();
146 $uri = $_SERVER[
'REQUEST_URI'];
147 $referer = $_SERVER[
'HTTP_REFERER'];
149 if ($errLevel & (E_NOTICE | E_WARNING | E_USER_WARNING | E_STRICT))
return;
151 while(ob_end_clean());
154 $log->code = $errLevel;
155 $log->message = $errMsg;
156 $log->file = $errFile;
157 $log->line = $errLine;
158 $log->details = $exception->getTraceAsString();
161 $log->referer = $referer;
162 $log->session = session_id();
179 trace($errMsg, 2, $exception->getTrace());
195 $template = file_get_contents(
$err);
199 catch (Exception $ex)
201 echo $ex->getMessage();
static resolveResource($resource, $component="")
Resolves the path to a web resource based on the PHP include path.
if($config["default_content_type"]) $isAction
◆ logError()
static ErrorLogManager::logError |
( |
|
$exception | ) |
|
|
static |
Manually log an exception in the error log.
Use this to record an internal error where processing needs to continue without redirection to an error page.
- Parameters
-
Definition at line 68 of file error_log_manager.inc.
75 $errMsg = $exception->getMessage();
76 $errLevel = $exception->getCode();
77 $errFile = $exception->getFile();
78 $errLine = $exception->getLine();
79 $uri = $_SERVER[
'REQUEST_URI'];
80 $referer = $_SERVER[
'HTTP_REFERER'];
82 if ($errLevel & (E_NOTICE | E_WARNING | E_USER_WARNING | E_STRICT))
return;
85 $log->code = $errLevel;
86 $log->message = $errMsg;
87 $log->file = $errFile;
88 $log->line = $errLine;
89 $log->details = $exception->getTraceAsString();
92 $log->referer = $referer;
93 $log->session = session_id();
110 trace($errMsg, 2, $exception->getTrace());
125 catch (Exception $ex)
127 echo $ex->getMessage();
◆ setDefaults()
static ErrorLogManager::setDefaults |
( |
| ) |
|
|
static |
Definition at line 45 of file error_log_manager.inc.
49 Settings::setDefaultValue(
"error_log",
"error_page_template",
"/fakoli/error.tpl", String,
"Specify the file name of your custom error page template, if you are using one. Leave this blank to use the default error reporting template");
static setDefaultValue($component, $name, $value, $field_type="String", $annotation="", $category="", $options="", $weight=0)
Sets the default value of the given component setting.
◆ upgradeComponent()
static ErrorLogManager::upgradeComponent |
( |
|
$version | ) |
|
|
static |
◆ $enableLogging
ErrorLogManager::$enableLogging = false |
|
static |
◆ $errorPageTemplate
ErrorLogManager::$errorPageTemplate = "" |
|
static |
◆ $loggingDestination
ErrorLogManager::$loggingDestination = "" |
|
static |
The documentation for this class was generated from the following file: