-
Notifications
You must be signed in to change notification settings - Fork 256
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add info about logging * Add SMS wordlist and change MonoLog
- Loading branch information
1 parent
813fd3c
commit 71dbe29
Showing
3 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1291,6 +1291,7 @@ slowlog | |
sm | ||
smartbar | ||
SMTP | ||
SMS | ||
snakeCase | ||
SnippetFileInterface | ||
SomeCoreClassTest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
nav: | ||
title: Monolog | ||
position: 20 | ||
|
||
--- | ||
|
||
# Monolog | ||
|
||
## Overview | ||
|
||
Monolog is a logging library for PHP. It is used by Shopware to log errors and debug information. The log files are located in the `var/log` directory of your Shopware installation. | ||
|
||
## Configuration | ||
|
||
Configuration of Monolog is done in the `config/packages/prod/monolog.yaml` file. The following example shows the default configuration: | ||
|
||
<<< @/docs/snippets/config/monolog.yaml | ||
|
||
|
||
## Log levels | ||
|
||
Monolog supports the following log levels: | ||
|
||
- `DEBUG`: Detailed debug information. | ||
- `INFO`: Interesting events. Examples: User logs in, SQL logs. | ||
- `NOTICE`: Normal but significant events. | ||
- `WARNING`: Exceptional occurrences that are not errors. Examples: Use of deprecated APIs, poor use of an API, undesirable things that are not necessarily wrong. | ||
- `ERROR`: Runtime errors that do not require immediate action but should typically be logged and monitored. | ||
- `CRITICAL`: Critical conditions. Example: Application component unavailable, unexpected exception. | ||
- `ALERT`: Action must be taken immediately. Example: Entire website down, database unavailable, etc. This should trigger the SMS alerts and wake you up. | ||
- `EMERGENCY`: Emergency: system is unusable. | ||
|
||
|
||
## Log sent e-mails and other flow events | ||
|
||
To monitor all sent e-mails and other flow events set the `business_event_handler_buffer` to `info` level: | ||
|
||
```yaml | ||
monolog: | ||
handlers: | ||
business_event_handler_buffer: | ||
level: info | ||
``` | ||
::: info | ||
Be aware that this will cost you some performance. | ||
::: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
monolog: | ||
handlers: | ||
main: | ||
type: fingers_crossed | ||
action_level: error | ||
handler: nested | ||
excluded_http_codes: [404, 405] | ||
buffer_size: 30 # How many messages should be saved? Prevent memory leaks | ||
business_event_handler_buffer: | ||
level: error | ||
nested: | ||
type: rotating_file | ||
path: "%kernel.logs_dir%/%kernel.environment%.log" | ||
level: error | ||
console: | ||
type: console | ||
process_psr_3_messages: false | ||
channels: ["!event", "!doctrine"] |