Download the PHP package interactive-solutions/zf-log-handler without Composer
On this page you can find all versions of the php package interactive-solutions/zf-log-handler. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download interactive-solutions/zf-log-handler
More information about interactive-solutions/zf-log-handler
Files in interactive-solutions/zf-log-handler
Package zf-log-handler
Short Description Interactive Solutions log handler
License MIT
Informations about the package zf-log-handler
zf-log-handler
Utility library to log exception (with stacktrace) and requests/response details to configured adapters.
Request duration
The duration will be part of the data sent to each adapter if the constant START_TIME
is
defined. If you wish to log the duration you should define('START_TIME', microtime(true))
before the application is bootstrapped.
Adapters
All adapters must implement the AdapterInterface
, the only provided adapter built into
this library is ElasticsearchAdapter
which logs data to elasticsearch.
Options
LogHandlerOptions
Handles general configuration of this library.
Example config below:
environment
is a string that will be added to the data array being logged, useful for easy filtering if logs contains data from several environmentsdebug
if set to true will log each incoming request and its corresponding response, if set to false it will disable logging of requests/responsesadapters
list of adapters implementing theAdapterInterface
, each adapter'swrite
method with all data to be loggedalwaysLogRoutes
list of route names whose request and corresponding response that should always be logged (event ifdebug
is set to false)
ElasticsearchOptions
Handles configuration for the ElasticsearchAdapter
.
Example config below:
host
the elasticsearch hostport
port of the elasticsearch hostusername
username to log onto elasticsearchpassword
password to log onto elasticsearchprefix
the prefix of the index in elasticsearch where data should be logged