From cf065415d5f9d9f1879fb3f1c1eb412ff70b76a3 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sat, 17 Sep 2011 11:43:09 +0200 Subject: [PATCH] Adjusments to docs/readme --- README.mdown | 6 ++++-- doc/extending.md | 2 +- doc/usage.md | 13 ++++++++----- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/README.mdown b/README.mdown index b5d6612f..b4c2c5c3 100644 --- a/README.mdown +++ b/README.mdown @@ -31,6 +31,8 @@ Custom severity levels are not available. Only six levels (debug, info, warning, Docs ==== +**See the doc/ directory for more detailed documentation. The following is only a list of all parts that come with Monolog.** + Handlers -------- @@ -77,7 +79,7 @@ Requirements Submitting bugs and feature requests ------------------------------------ -Bugs and feature request are tracked on [Github](https://github.com/Seldaek/monolog/issues) +Bugs and feature request are tracked on [GitHub](https://github.com/Seldaek/monolog/issues) Author ------ @@ -93,4 +95,4 @@ Monolog is licensed under the MIT License - see the LICENSE file for details Acknowledgements ---------------- -This library is heavily inspired by Python's [Logbook](http://packages.python.org/Logbook/) library, although most concepts have been adjusted to fit in the PHP world. +This library is heavily inspired by Python's [Logbook](http://packages.python.org/Logbook/) library, although most concepts have been adjusted to fit to the PHP world. diff --git a/doc/extending.md b/doc/extending.md index 322d256e..cfc1e099 100644 --- a/doc/extending.md +++ b/doc/extending.md @@ -1,7 +1,7 @@ Extending Monolog ================= -Monolog is fully extendable, allowing you to adapt your logger to your needs. +Monolog is fully extensible, allowing you to adapt your logger to your needs. Writing your own handler ------------------------ diff --git a/doc/usage.md b/doc/usage.md index e42bbc9a..4e55455f 100644 --- a/doc/usage.md +++ b/doc/usage.md @@ -8,7 +8,7 @@ To install Monolog, simply get the code (from github or through PEAR) and configure an autoloader for the Monolog namespace. Monolog does not provide its own autoloader but follows the PSR-0 convention, -thus allowing to use any compliant autoloader. You could for instance use +thus allowing you to use any compatible autoloader. You could for instance use the [Symfony2 ClassLoader component](https://github.com/symfony/ClassLoader). Configuring a logger @@ -42,7 +42,8 @@ some handlers. The code above registers two handlers in the stack to allow handling records in two different ways. Note that the FirePHPHandler is called first as it is added on top of the -stack. +stack. This allows you to temporarily add a logger with bubbling disabled if +you want to override other configured loggers. Adding extra data in the records -------------------------------- @@ -75,7 +76,7 @@ write a processor adding some dummy data in the record: ```php pushProcessor(function($record){ +$logger->pushProcessor(function ($record) { $record['extra']['dummy'] = 'Hello world!'; return $record; @@ -92,8 +93,10 @@ Leveraging channels ------------------- Channels are a great way to identify to which part of the application a record -is related. This is useful in big application (and is leveraged by MonologBundle -in Symfony2). +is related. This is useful in big applications (and is leveraged by +MonologBundle in Symfony2). You can then easily grep through log files for +example to filter this or that type of log record. + Using different loggers with the same handlers allow to identify the logger that issued the record (through the channel name) by keeping the same handlers (for instance to use a single log file).