$loggerContent
$loggerContent :
Data formatter for the combined log format.
formatField(string $field_name, string $value = null)
Format only a single log field and store it in the associated LoggerContent object.
string | $field_name | ID of log format field. |
string | $value | Provide an (optional) value to format and pass thru to the LoggerContent object, so allowing for the injection of external data. |
formatAllField(string $field_name, string $value = null)
Format and enclose (prefix/suffix) a single log field and store it in the associated LoggerContent object.
string | $field_name | ID of log format field. |
string | $value | Provide an (optional) value to format and pass thru to the LoggerContent object, so allowing for the injection of external data. |
encloseField(string $field_name, string $value = null)
Enclose (prefix/suffix) a single log field and store it in the associated LoggerContent object.
string | $field_name | ID of log format field. |
string | $value | Provide an (optional) value to format and pass thru to the LoggerContent object, so allowing for the injection of external data. |
buildRequestLineString(string $request_method, string $request_uri, string $query_string = null, string $protocol) : string
Helper method to build content for the "request line" of the "common" and "combined" log format.
string | $request_method | |
string | $request_uri | |
string | $query_string | May be blank |
string | $protocol |
Proper request line, format: request_method request_uri[?query_string] protocol
explodeRequestLineString(string $request_line) : array
Helper method to split the content of a "request line" of the "common" and "combined" log format into its chunks.
string | $request_line |
An associative array representing the single portions of the request line: request_method[0], request_uri[1], query_string[2], protocol[3].
getInstance(array|mixed|null $inject = null) : \phpWTL\$_instance[$class]
Create new instance or give back already existing one.
array|mixed|null | $inject | Can be used to inject one or more parameter(s) into the constructor |
The instance of a derived class