1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-05 12:47:39 +02:00

Merge pull request #1467 from abdounikarim/patch-1

Update 01-usage.md
This commit is contained in:
Jordi Boggiano
2020-06-02 10:06:32 +02:00
committed by GitHub

View File

@@ -125,7 +125,7 @@ record:
```php
<?php
$logger->info('Adding a new user', array('username' => 'Seldaek'));
$logger->info('Adding a new user', ['username' => 'Seldaek']);
```
Simple handlers (like the StreamHandler for instance) will simply format
@@ -206,6 +206,8 @@ write your own (e.g. a multiline text file for human-readable output).
To configure a predefined formatter class, just set it as the handler's field:
```php
<?php
// the default date format is "Y-m-d\TH:i:sP"
$dateFormat = "Y n j, g:i a";
// the default output format is "[%datetime%] %channel%.%level_name%: %message% %context% %extra%\n"