Download the PHP package davidhavl/dherrorlogging without Composer

On this page you can find all versions of the php package davidhavl/dherrorlogging. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package dherrorlogging

DHErrorLogging - ZF2 / ZF3 application error logging

Latest Version Downloads

Introduction

Full featured Error logging module for ZF2/ZF3 MVC application.

Features

Installation

Notes

Via the dherrorlogging.global.php you can enable/disable the logging functionality completely or disable just some types of errors/exceptions. You can configure several other things such as template path for errors or log writers. You can also overwrite the logger, processor, reference generator or response sender if you wish (and know what you are doing).

When adding new log writer you can either add new config array for some of the the standard ZF2 writers that don't need injection of other objects (stream, chromephp, 'fingerscrossed', 'firephp', 'mail', 'mock', 'null', 'syslog', 'zendmonitor') or identifier of your own registered log writer factory (registered in main config section ['log_writers']) to the '['dherrorlogging']['log_writers']' section.

In order for the error page to return http status code 500 you should have PHP display_errors off.

Example db writer setup:

Let say you want to enable logging to database via zend db. I have provided a custom db log writer (DhErrorLogging\DbWriter) right out of the box, so all you need to do is to uncomment the db part (line 71 - 91) of the new dherrorlogging.global.php in your config directory so that the module knows you want to use database, and lastly say you are using MySQL you can use the bellow sql schema (also found in /data/sql directory) to create log table in your database:

CREATE TABLE IF NOT EXISTS `error_log` (
  `log_id` int(11) NOT NULL AUTO_INCREMENT,
  `creation_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `reference` varchar(6) DEFAULT '',
  `type` varchar(10) DEFAULT 'ERROR',
  `priority` varchar(6) DEFAULT 'DEBUG',
  `message` text,
  `file` text,
  `line` varchar(12),
  `trace` text,
  `xdebug` text,
  `uri` text,
  `request` text,
  `ip` varchar(45) DEFAULT NULL,
  `session_id` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`log_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

Or use your own table and field names but make sure you adjust the ['db']['options']['table_name'] and ['db']['options']['table_map'] accordingly. Also make sure that zend db adapter alias (line 191 of dherrorlogging.global.php) is set to same adapter you are using.

Example doctrine writer setup:

I have provided a custom doctrine log writer (DhErrorLogging\Writer\DoctrineWriter) right out of the box, so all you need to do is to uncomment the doctrine part (line 100 - 102) of the new dherrorlogging.global.php and run doctrine update command to create the new table. Make sure that doctrine entity manager alias (line 199 of dherrorlogging.global.php) is set to same one you are using.

Migration from v1 to v2

Version 2 is in large respect a complete rewrite. The following has also been added:

In matter of settings, the following has been deprecated: ['dherrorlogging']['priority'] You can easily re-enable this functionality if you use your own logger implementation.

Contributing

Want to make it better or more polished? Feel free to send pull request. I am always happy to collaborate with others or listen to a feedback. Don't know where to start? How about help with writing tests.

TODO:


All versions of dherrorlogging with dependencies

PHP Build Version
Package Version
Requires php Version ^5.6 || ^7.0
container-interop/container-interop Version ^1.1
zendframework/zend-mvc Version ^2.6 || ^3.0
zendframework/zend-http Version ^2.5 || ^3.0
zendframework/zend-modulemanager Version ^2.7 || ^3.0
zendframework/zend-servicemanager Version ^2.7 || ^3.0
zendframework/zend-config Version ^2.6 || ^3.0
zendframework/zend-log Version ^2.6 || ^3.0
zendframework/zend-db Version ^2.6 || ^3.0
zendframework/zend-mail Version ^2.6 || ^3.0
zendframework/zend-view Version ^2.6 || ^3.0
zendframework/zend-console Version ^2.6 || ^3.0
zendframework/zend-json Version ^2.6 || ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package davidhavl/dherrorlogging contains the following files

Loading the files please wait ....