Skip to content

Commit

Permalink
Logging example
Browse files Browse the repository at this point in the history
  • Loading branch information
timkelty committed Jun 12, 2024
1 parent 361f66f commit df32f4b
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,33 @@ composer require craftcms/feed-me
./craft plugin/install 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:

```php
return [
'components' => [
'log' => [
'monologTargetConfig' => [
// optionally, omit from Craft's default logs
'except' => ['feed-me'],
],

// add your own log target to write logs to file
'targets' => [
[
'class' => \yii\log\FileTarget::class,
'logFile' => '@storage/logs/feed-me.log',
'categories' => ['feed-me'],
],
],
],
],
];
```

## Resources

- **[Feed Me Plugin Page](https://plugins.craftcms.com/feed-me)** – The official plugin page for Feed Me
Expand Down

0 comments on commit df32f4b

Please sign in to comment.