mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-04 04:07:39 +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:
committed by
GitHub
parent
38914429aa
commit
148a26ae5a
@@ -125,7 +125,7 @@ record:
|
|||||||
```php
|
```php
|
||||||
<?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
|
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:
|
To configure a predefined formatter class, just set it as the handler's field:
|
||||||
|
|
||||||
```php
|
```php
|
||||||
|
<?php
|
||||||
|
|
||||||
// the default date format is "Y-m-d\TH:i:sP"
|
// the default date format is "Y-m-d\TH:i:sP"
|
||||||
$dateFormat = "Y n j, g:i a";
|
$dateFormat = "Y n j, g:i a";
|
||||||
// the default output format is "[%datetime%] %channel%.%level_name%: %message% %context% %extra%\n"
|
// the default output format is "[%datetime%] %channel%.%level_name%: %message% %context% %extra%\n"
|
||||||
|
Reference in New Issue
Block a user