interface BackendInterface (View source)

Contract for a logger backend interface

Methods

void
open()

Carries out all actions necessary to prepare the logging backend, such as opening the log file or opening a database connection.

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

Appends the given message along with the additional information into the log.

void
close()

Carries out all actions necessary to cleanly close the logging backend, such as closing the log file or disconnecting from a database.

Details

void open()

Carries out all actions necessary to prepare the logging backend, such as opening the log file or opening a database connection.

Return Value

void

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

Appends the given message along with the additional information into the log.

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

Carries out all actions necessary to cleanly close the logging backend, such as closing the log file or disconnecting from a database.

Return Value

void