Merge pull request #394 from xiekeyang/feature-panic-hook
Feature: Add Hook for Web Application Panic
This commit is contained in:
commit
0d40913b9a
7 changed files with 223 additions and 2 deletions
|
@ -25,6 +25,20 @@ log:
|
|||
fields:
|
||||
service: registry
|
||||
environment: staging
|
||||
hooks:
|
||||
- type: mail
|
||||
disabled: true
|
||||
levels:
|
||||
- panic
|
||||
options:
|
||||
smtp:
|
||||
addr: mail.example.com:25
|
||||
username: mailuser
|
||||
password: password
|
||||
insecure: true
|
||||
from: sender@example.com
|
||||
to:
|
||||
- errors@example.com
|
||||
loglevel: debug # deprecated: use "log"
|
||||
storage:
|
||||
filesystem:
|
||||
|
@ -233,6 +247,28 @@ log:
|
|||
</td>
|
||||
</table>
|
||||
|
||||
## hooks
|
||||
|
||||
|
||||
```yaml
|
||||
hooks:
|
||||
- type: mail
|
||||
levels:
|
||||
- panic
|
||||
options:
|
||||
smtp:
|
||||
addr: smtp.sendhost.com:25
|
||||
username: sendername
|
||||
password: password
|
||||
insecure: true
|
||||
from: name@sendhost.com
|
||||
to:
|
||||
- name@receivehost.com
|
||||
```
|
||||
|
||||
The `hooks` subsection configures the logging hooks' behavior. This subsection
|
||||
includes a sequence handler which you can use for sending mail, for example.
|
||||
Refer to `loglevel` to configure the level of messages printed.
|
||||
|
||||
## loglevel
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue