abstract class AbstractTcpLogger implements LoggerInterface (View source)

Send message to TCP server

Traits

LoggerTrait

Methods

string
formatMessage(string $level, unknown $message, array $context = array())

No description

__construct(string $host, integer $port)

No description

__destruct()

Close connection

boolean
isConnected()

Indicates if the TCP socket is valid

log($level, $message, array $context = array())

Send message over TCP

Details

abstract string formatMessage(string $level, unknown $message, array $context = array())

Parameters

string $level Log level identifier
unknown $message Log message
array $context Context

Return Value

string Message to send through the TCP socket

__construct(string $host, integer $port)

Parameters

string $host Hostname or IP address
integer $port Port number

__destruct()

Close connection

boolean isConnected()

Indicates if the TCP socket is valid

Return Value

boolean

log($level, $message, array $context = array())

Send message over TCP

{@inheritdoc}

Parameters

$level
$message
array $context

See also

\Psr\Log\LoggerInterface::log()