## Class LoggerAppenderSocket

Description

LoggerAppenderSocket appends to a network socket.

## Configurable parameters: ##

- **remoteHost** - Target remote host.
- **port** - Target port (optional, defaults to 4446).
- **timeout** - Connection timeout in seconds (optional, defaults to 'default_socket_timeout' from php.ini)

The socket will by default be opened in blocking mode.

- version: $Revision: 1337820 $
- link: Appender documentation
- license: Apache License, Version 2.0

Located in /log4php/appenders/LoggerAppenderSocket.php (line 37)

    LoggerConfigurable
       |
       --LoggerAppender
          |
          --LoggerAppenderSocket

Variable Summary
mixed $port
mixed $remoteHost
mixed $timeout
Method Summary
void activateOptions ()
void append (LoggerLoggingEvent $event)
void getDefaultLayout ()
void getPort ()
void getRemoteHost ()
void getTimeout ()
void setPort ( $port)
void setRemoteHost ( $hostname)
void setTimeout ( $timeout)
Variables
mixed $port = 4446 (line 46)

Target port

- access: protected

mixed $remoteHost (line 43)

Target host.

- see: http://php.net/manual/en/function.fsockopen.php
- access: protected

mixed $timeout (line 49)

Connection timeout in ms.

- access: protected

#### Inherited Variables

Inherited from LoggerAppender

> LoggerAppender::$closed
> LoggerAppender::$filter
> LoggerAppender::$layout
> LoggerAppender::$name
> LoggerAppender::$requiresLayout
> LoggerAppender::$threshold

Methods
activateOptions (line 60)

- access: public

void activateOptions ()

Redefinition of:

LoggerAppender::activateOptions()
  Prepares the appender for logging.

append (line 74)

- access: public

void append (LoggerLoggingEvent $event)

- LoggerLoggingEvent $event

Redefinition of:

LoggerAppender::append()
  Forwards the logging event to the destination.

getDefaultLayout (line 56)

Override the default layout to use serialized.

- access: public

void getDefaultLayout ()

Redefinition of:

LoggerAppender::getDefaultLayout()
  Returns the default layout for this appender. Can be overriden by derived appenders.

getPort (line 114)

Returns the target port.

- access: public

void getPort ()
getRemoteHost (line 109)

Returns the target host.

- access: public

void getRemoteHost ()
getTimeout (line 119)

Returns the timeout

- access: public

void getTimeout ()
setPort (line 99)

Sets the target port

- access: public

void setPort ( $port)

- $port

setRemoteHost (line 94)

Sets the target host.

- access: public

void setRemoteHost ( $hostname)

- $hostname

setTimeout (line 104)

Sets the timeout.

- access: public

void setTimeout ( $timeout)

- $timeout

#### Inherited Methods

Inherited From LoggerAppender

> LoggerAppender::__construct()
> LoggerAppender::activateOptions()
> LoggerAppender::addFilter()
> LoggerAppender::append()
> LoggerAppender::clearFilters()
> LoggerAppender::close()
> LoggerAppender::doAppend()
> LoggerAppender::getDefaultLayout()
> LoggerAppender::getFilter()
> LoggerAppender::getFirstFilter()
> LoggerAppender::getLayout()
> LoggerAppender::getName()
> LoggerAppender::getThreshold()
> LoggerAppender::isAsSevereAsThreshold()
> LoggerAppender::requiresLayout()
> LoggerAppender::setLayout()
> LoggerAppender::setName()
> LoggerAppender::setThreshold()
> LoggerAppender::warn()
> LoggerAppender::__destruct()

Inherited From LoggerConfigurable

> LoggerConfigurable::setBoolean()
> LoggerConfigurable::setFileSize()
> LoggerConfigurable::setInteger()
> LoggerConfigurable::setLevel()
> LoggerConfigurable::setNumeric()
> LoggerConfigurable::setPositiveInteger()
> LoggerConfigurable::setString()
> LoggerConfigurable::warn()

Documentation generated on Fri, 10 Apr 2026 12:21:03 +0900 by phpDocumentor 1.4.4