Stackdriver Error Reporting Client - Class Bootstrap (0.21.1)

Reference documentation and code samples for the Stackdriver Error Reporting Client class Bootstrap.

Static methods for bootstrapping Stackdriver Error Reporting.

Namespace

Google \ Cloud \ ErrorReporting

Methods

static::prependFileLocation

Return the full path of the prepend file.

Returns
TypeDescription
string

static::init

Register hooks for error reporting.

Parameter
NameDescription
psrLogger Google\Cloud\Logging\PsrLogger
Returns
TypeDescription
void

static::getErrorPrefix

Return a string prefix for the given error level.

Parameter
NameDescription
level int
Returns
TypeDescription
stringA string prefix for reporting the error.

static::getErrorLevelString

Return an error level string for the given PHP error level.

Parameter
NameDescription
level int
Returns
TypeDescription
stringAn error level string.

static::exceptionHandler

Parameter
NameDescription
ex mixed

\Throwable (PHP 7) or \Exception (PHP 5)

static::errorHandler

Parameters
NameDescription
level int

The error level.

message string

The error message.

file string

The filename that the error was raised in.

line int

The line number that the error was raised at.

static::shutdownHandler

Called at exit, to check there's a fatal error and report the error if any.

Constants

DEFAULT_LOGNAME

Value: 'app-error'