Neuron-PHP

Socket extends DestinationBase
in package

Outputs log data to a socket.

Table of Contents

Properties

$_address  : string
$_filters  : array<string|int, mixed>
$_format  : IFormat
$_parent  : ILogger|null
$_port  : int
$_stdErr  : mixed
$_stdOut  : mixed

Methods

__construct()  : mixed
addFilter()  : bool
Adds a logging filter.
close()  : void
Closes the destination if required.
error()  : mixed
getParent()  : ILogger
Gets the parent logger.
getStdErr()  : mixed
getStdOut()  : mixed
log()  : void
Handles writing the log data after filtering and formatting.
open()  : bool
Configure the socket.
removeFilter()  : bool
Removes a logging filter.
setFileHandles()  : void
Maps STDERR and STDOUT to file handles in non-CLI environments.
setFormat()  : void
Sets the formatter.
setParent()  : void
Sets the parent logger.
write()  : void
Writes the formatted log data to the specific destination.

Properties

$_address

private string $_address

Methods

error()

public error(string $sMsg) : mixed
Parameters
$sMsg : string
Tags
throws
Exception

log()

Handles writing the log data after filtering and formatting.

public log(mixed $text, mixed $level[, mixed $context = [] ]) : void
Parameters
$text : mixed
  • Output that has been run through the formatter.
$level : mixed
  • Text output level.
$context : mixed = []
  • Optional context array

open()

Configure the socket.

public open(array<string|int, mixed> $params) : bool

Parameters: ip_address - IP address of the socket. port - Port of the socket.

Parameters
$params : array<string|int, mixed>
Return values
bool

removeFilter()

Removes a logging filter.

public removeFilter(IFilter $removeFilter) : bool
Parameters
$removeFilter : IFilter
Return values
bool

setFileHandles()

Maps STDERR and STDOUT to file handles in non-CLI environments.

public setFileHandles() : void

write()

Writes the formatted log data to the specific destination.

public write(string $text, Data $data) : void
Parameters
$text : string
$data : Data
Tags
throws
Exception
SuppressWarnings

(PHPMD)


        
On this page

Search results