This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

Logger all error in file for PHP

0.5.0 2021-04-17 12:55 UTC

This package is auto-updated.

Last update: 2021-09-17 22:27:44 UTC


Logger all error in file for PHP

Example example/test.php

  • include_once "src/PHPErrorCatcher.php";

  • xakki\phperrorcatcher\PHPErrorCatcher::init([...]);

Custom error report

  • xakki\phperrorcatcher\PHPErrorCatcher::logException($e); // from Exception

  • xakki\phperrorcatcher\PHPErrorCatcher::logError('My custom error'); // custom error

  • trigger_error($message, E_USER_WARNING); // simple error trigger

Log browser errors

  • <script src="catcher.js"> and yoy can catch all errors
  • errorCatcher('custom errors')