1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-07 05:36:45 +02:00

Adjusments to docs/readme

This commit is contained in:
Jordi Boggiano
2011-09-17 11:43:09 +02:00
parent b7a18a1af4
commit cf065415d5
3 changed files with 13 additions and 8 deletions

View File

@@ -31,6 +31,8 @@ Custom severity levels are not available. Only six levels (debug, info, warning,
Docs Docs
==== ====
**See the doc/ directory for more detailed documentation. The following is only a list of all parts that come with Monolog.**
Handlers Handlers
-------- --------
@@ -77,7 +79,7 @@ Requirements
Submitting bugs and feature requests 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 Author
------ ------
@@ -93,4 +95,4 @@ Monolog is licensed under the MIT License - see the LICENSE file for details
Acknowledgements 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.

View File

@@ -1,7 +1,7 @@
Extending Monolog 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 Writing your own handler
------------------------ ------------------------

View File

@@ -8,7 +8,7 @@ To install Monolog, simply get the code (from github or through PEAR) and
configure an autoloader for the Monolog namespace. configure an autoloader for the Monolog namespace.
Monolog does not provide its own autoloader but follows the PSR-0 convention, 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). the [Symfony2 ClassLoader component](https://github.com/symfony/ClassLoader).
Configuring a logger 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. handling records in two different ways.
Note that the FirePHPHandler is called first as it is added on top of the 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 Adding extra data in the records
-------------------------------- --------------------------------
@@ -75,7 +76,7 @@ write a processor adding some dummy data in the record:
```php ```php
<?php <?php
$logger->pushProcessor(function($record){ $logger->pushProcessor(function ($record) {
$record['extra']['dummy'] = 'Hello world!'; $record['extra']['dummy'] = 'Hello world!';
return $record; return $record;
@@ -92,8 +93,10 @@ Leveraging channels
------------------- -------------------
Channels are a great way to identify to which part of the application a record 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 is related. This is useful in big applications (and is leveraged by
in Symfony2). 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 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 that issued the record (through the channel name) by keeping the same handlers
(for instance to use a single log file). (for instance to use a single log file).