Skip to content

Instantly share code, notes, and snippets.

@gvgvgvijayan
Created August 11, 2019 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gvgvgvijayan/adf649288da082fa735a1b77689fdc88 to your computer and use it in GitHub Desktop.
Save gvgvgvijayan/adf649288da082fa735a1b77689fdc88 to your computer and use it in GitHub Desktop.
Tombstone helper
<?php
namespace Helper\TombstoneHelper;
use Scheb\Tombstone\{
GraveyardProvider,
Handler\StreamHandler,
Tracing\TraceProvider
};
class TombstoneHelper {
public $logPath = "/var/www/html/tombstone/logs/tombstones.log";
public function __construct() {
$streamHandler = new StreamHandler($this->logPath);
GraveyardProvider::getGraveyard()->addHandler($streamHandler);
}
public function tombstone() {
try {
$trace = TraceProvider::getTraceHere();
GraveyardProvider::getGraveyard()
->tombstone(func_get_args(), $trace, []);
} catch (\Exception $ex) {
//Log your exception
var_dump($ex);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment