Skip to content
This repository was archived by the owner on Apr 7, 2020. It is now read-only.

Commit c7af97e

Browse files
Merge pull request #30 from noniagriconomie/master
Update README.md
2 parents 224e1df + 126c84e commit c7af97e

File tree

1 file changed

+35
-2
lines changed

1 file changed

+35
-2
lines changed

README.md

+35-2
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Installation
122122
This project is distributed as a PHP package instead of a Symfony bundle, so you just need to require the project with [Composer](https://getcomposer.org):
123123

124124
```bash
125-
$ composer require easycorp/easy-log-handler
125+
$ composer require --dev easycorp/easy-log-handler
126126
```
127127

128128
Configuration and Usage
@@ -132,6 +132,19 @@ Configuration and Usage
132132

133133
Define a new service in your application for this log handler:
134134

135+
Newer Symfony version:
136+
137+
```yaml
138+
# config/packages/dev/easy_log_handler.yaml
139+
services:
140+
EasyCorp\EasyLog\EasyLogHandler:
141+
public: false
142+
arguments: ['%kernel.logs_dir%/%kernel.environment%.log']
143+
144+
```
145+
146+
Older Symfony version:
147+
135148
```yaml
136149
# app/config/services.yml
137150
services:
@@ -145,7 +158,27 @@ services:
145158
146159
### Step 2
147160
148-
Update your Monolog configuration in the `dev` environment to define a buffered handler that wraps this new handler service (keep reading to understand why). You can safely copy+paste this configuration:
161+
Update your Monolog configuration in the `dev` environment to define a buffered handler
162+
that wraps this new handler service (keep reading to understand why).
163+
You can safely copy+paste this configuration:
164+
165+
Newer Symfony version:
166+
167+
```yaml
168+
# config/packages/dev/monolog.yaml
169+
monolog:
170+
handlers:
171+
buffered:
172+
type: buffer
173+
handler: easylog
174+
channels: ['!event']
175+
level: debug
176+
easylog:
177+
type: service
178+
id: EasyCorp\EasyLog\EasyLogHandler
179+
```
180+
181+
Older Symfony version:
149182

150183
```yaml
151184
# app/config/config_dev.yml

0 commit comments

Comments
 (0)