You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<divclass="alert"><strong>DEPRECATED!</strong> Warning, this package is deprecated in favor of
5
-
<em>mouf/utils.log.psr.errorlog_logger</em> that implements the same logger, but with PSR-3
6
-
compatibility.</div>
4
+
This package contains a PSR-3 compliant composite logger class.
7
5
8
-
This package contains a logger that logs messages in the PHP error log, using the error_log function.
6
+
In practice, this class does not log anything but delegates logging to one or many PSR-3 compliant loggers.
7
+
This is useful when you want to call multiple loggers at one.
9
8
10
-
Mouf package
11
-
------------
9
+
Install
10
+
-------
12
11
13
-
This package is part of Mouf (http://mouf-php.com), an effort to ensure good developing practices by providing a graphical dependency injection framework.
12
+
```sh
13
+
composer require mouf/utils.log.psr.multi-logger
14
+
```
15
+
16
+
Usage
17
+
-----
18
+
19
+
Simply pass an array of loggers to the multi-logger:
20
+
21
+
```php
22
+
$logger1 = new MyLogger();
23
+
$logger2 = new AnotherLogger();
24
+
25
+
$multiLogger = new Mouf\Utils\Log\Psr\MultiLogger([ $logger1, $logger2 ]);
26
+
```
27
+
28
+
You can also add loggers using the `addLogger` method:
29
+
30
+
```php
31
+
$logger1 = new MyLogger();
32
+
$logger2 = new AnotherLogger();
33
+
34
+
$multiLogger = new Mouf\Utils\Log\Psr\MultiLogger();
0 commit comments