Download the PHP package gelembjuk/logger without Composer
On this page you can find all versions of the php package gelembjuk/logger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gelembjuk/logger
More information about gelembjuk/logger
Files in gelembjuk/logger
Package logger
Short Description Allows to add logging functions to different classes, helps to handle errors, log errors and display error screen. Can catch warnings and fatal errors
License MIT
Informations about the package logger
Logger
PHP Package for easy logging and error catching. FileLogger class based on Psr/Log helps to filter what to log. ErrorScreen class helps to catch PHP Warnings and Fatal errors and display correct error screen to a user. ApplicationLogger is a trait to include logger in different classes very easy
Installation
Using composer: gelembjuk/logger
Configuration
Configuration is done in run time with a constructor options (as hash argument)
Configure FileLogger
logfile path to your log file (where to write logs)
groupfilter list of groups of events to log. all
means log everything. Groups separated with | symbol
Configure ErrorScreen
catchwarnings - (true|false) . If true then user error handler is set to catch warnings
catchfatals - (true|false) . If true then fatal errors are catched. Use to log error and show normal
error screen
catchexceptions - (true|false) . If true then uncatched exceptions will be catched by the object. Use this to catch exceptions missed in any try {} catch block
showwarningmessage - (true|false) . If true then error screen is displayed in case of warning. If is false then error is only logged
showfatalmessage - (true|false) . Display error screen for fatal errors. If false then only log is dine. User will see standard
fatal error in this case
viewformat - set vaue for the viewformat
variable. Possible values: html, json, xml, http . html is default value
showtrace - (true|false). Switcher to know if to show error trace for a user as part of error screen
commonerrormessage - string Common error message to show to a user when error happens
logger - Object of FileLogger class
loggeroptions - Options to create new FileLogger object
Usage
FileLogger
ApplicationLogger trait
ErrorScreen
Author
Roman Gelembjuk (@gelembjuk)