Skip to content

Commit

Permalink
Clarify example
Browse files Browse the repository at this point in the history
  • Loading branch information
timkelty committed Aug 14, 2024
1 parent 1194b6d commit aad2bdc
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,22 @@ composer require craftcms/feed-me
## Customizing Logs

As of version `5.6`/`6.2`, logging is handled by Craft's log component and stored in the database instead of the filesystem.
If you want them logged to files (or anywhere else), you can add your own log target in your `config/app.php` file:
To log to files (or anywhere else) instead, you can disable the default logging add your own log target:

### config/feed-me.php

```php
<?php
return [
// disable default logging to database
'logging' => false,
];
```

### config/app.php

```php
<?php
return [
'components' => [
'log' => [
Expand All @@ -48,9 +61,16 @@ return [
// add your own log target to write logs to file
'targets' => [
[
'class' => \yii\log\FileTarget::class,
'logFile' => '@storage/logs/feed-me.log',
// log to file or STDOUT/STDERR if CRAFT_STREAM_LOG=1 is set
'class' => \craft\log\MonologTarget::class,
'name' => 'feed-me',
'categories' => ['feed-me'],

// Don't log request and env vars
'logContext' => true,

// Minimum level to log
'level' => \Psr\Log\LogLevel::INFO,
],
],
],
Expand Down

0 comments on commit aad2bdc

Please sign in to comment.