class NullBackend extends AbstractBackend (View source)

A backend which just ignores everything

Properties

protected int $severityThreshold

One of the LOG_* constants. Anything below that will be filtered out.

from  AbstractBackend
protected bool $logIpAddress

Flag telling if the IP address of the current client (if available) should be logged.

from  AbstractBackend

Methods

__construct(mixed $options = [])

Constructs this log backend

void
setSeverityThreshold(int $severityThreshold)

The maximum severity to log, anything less severe will not be logged.

void
setLogIpAddress(bool $logIpAddress)

Enables or disables logging of IP addresses.

void
open()

Does nothing

void
append(string $message, int $severity = 1, mixed $additionalData = null, string $packageKey = null, string $className = null, string $methodName = null)

Ignores the call

void
close()

Does nothing

Details

__construct(mixed $options = [])

Constructs this log backend

Parameters

mixed $options

Configuration options - depends on the actual backend

void setSeverityThreshold(int $severityThreshold)

The maximum severity to log, anything less severe will not be logged.

Parameters

int $severityThreshold

One of the LOG_* constants

Return Value

void

void setLogIpAddress(bool $logIpAddress)

Enables or disables logging of IP addresses.

Parameters

bool $logIpAddress

Set to true to enable logging of IP address, or false to disable

Return Value

void

void open()

Does nothing

Return Value

void

void append(string $message, int $severity = 1, mixed $additionalData = null, string $packageKey = null, string $className = null, string $methodName = null)

Ignores the call

Parameters

string $message

The message to log

int $severity

One of the LOG_* constants

mixed $additionalData

A variable containing more information about the event to be logged

string $packageKey

Key of the package triggering the log (determined automatically if not specified)

string $className

Name of the class triggering the log (determined automatically if not specified)

string $methodName

Name of the method triggering the log (determined automatically if not specified)

Return Value

void

void close()

Does nothing

Return Value

void