Class SystemLog
SystemLog package, used to log requests and exceptions
Defined settings:
- object system-log
- string log Log implentation class (full class path)
- integer body_raw_limit [Optional] In bytes, default is 1000000
- array matrix [Optional] Set log level for each Controller::method.
Constants defined in this class with prefix LOG_ are used as flags to enable certain fields. - array matrix-exception [Optional] Set log level for each exception class.
Constants defined in this class with prefix LOG_ are used as flags to enable certain fields.
See __construct method for an example
License: Apache-2.0
Author: Xenofon Spafaridis nohponex@gmail.com
Since: 0.0.0
Link: Source code
Link: Documentation
Located at SystemLog.php
Methods summary
public
|
#
__construct( object $settings )
Create new system log instance
Use register method to register the instance to phramework. |
public
|
Constants summary
integer |
LOG_STANDARD
Default flag for requests By default will store:
|
#
0
|
integer |
LOG_EXCEPTION_STANDARD
Default flag for exceptions
In addition to fields described in
|
#
0
|
integer |
LOG_IGNORE
Will ignore this request from system log |
#
1
|
integer |
LOG_USER_ID
Will log user's id if request is authenticated, if not false will be written.
Stored as string |
#
2
|
integer |
LOG_REQUEST_HEADER_AGENT
Enables log of |
#
65536
|
integer |
LOG_REQUEST_HEADER_REFERER
Enables log of |
#
131072
|
integer |
LOG_REQUEST_HEADER_ACCEPT
Enables log of |
#
524288
|
integer |
LOG_REQUEST_HEADER_CONTENT_TYPE
Enables log of |
#
1048576
|
integer |
LOG_REQUEST_HEADERS
Enables log of all request headers.
Stored as array item in |
#
2097152
|
integer |
LOG_REQUEST_PARAMS
Enables log of parsed request parameters.
Stored as object |
#
4194304
|
integer |
LOG_REQUEST_BODY_RAW
Enables log of raw request body if any. |
#
8388608
|
integer |
LOG_RESPONSE_HEADER
Enables log of response headers.
Stored as array |
#
281474976710656
|
integer |
LOG_RESPONSE_BODY
Enables log of response body.
Stored as string |
#
562949953421312
|
Properties summary
protected
|
$logObject
Log storage implentation |
|
protected
object
|
$settings
System log instance settings |