1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-01 10:50:21 +02:00

Update 01-usage.md

Hello,

I just update a code to use the array short syntax.
And i also correct highlight syntax.

😉
This commit is contained in:
Abdouni Abdelkarim
2020-06-01 10:39:40 +02:00
committed by GitHub
parent 38914429aa
commit 148a26ae5a

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"