Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 47 lines (32 sloc) 0.92 kb
2ff85ba @Seldaek Added README file
authored
1 Monolog - Logging for PHP 5.3
2 =============================
3
4 Usage
5 -----
6
7 use Monolog\Logger;
8 use Monolog\Log;
9 use Monolog\Writer\FileWriter;
10 use Monolog\Formatter\SimpleFormatter;
11
12 // create a log with writers/formatters
13 $writer = new FileWriter('path/to/your.log');
14 $writer->setFormatter(new SimpleFormatter());
15 $log = new Log('name', Logger::WARN, $writer);
16
17 // create a logger with one or more logs
18 $logger = new Logger(array($log));
19
20 // write to all logs
21 $logger->warn('Foo');
22
23 // write only to the 'name' log
24 $logger->error('Bar', 'name');
25
26 Todo
27 ----
28
29 - Log rotation for FileWriter
30 - FirePHP writer
31 - Syslog writer
32
33 Author
34 ------
35
36 Jordi Boggiano - <j.boggiano@seld.be> - <http://twitter.com/seldaek>
37
38 License
39 -------
40
41 Monolog is licensed under the New BSD License - see the LICENSE file for details
42
43 Requirements
44 ------------
45
46 Any flavor of PHP5.3 should do
Something went wrong with that request. Please try again.