xakki/phperrorcatcher

Logger all error in file for PHP

Installs: 68

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

pkg:composer/xakki/phperrorcatcher

0.8.0 2021-12-19 00:59 UTC

This package is auto-updated.

Last update: 2025-10-07 09:57:17 UTC


README

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')