mirror of
https://github.com/containrrr/watchtower.git
synced 2025-09-22 05:40:50 +02:00
Do not send an email notification when no messages have been logged.
This commit is contained in:
parent
4c63746feb
commit
a23f49f444
1 changed files with 2 additions and 2 deletions
|
@ -87,10 +87,10 @@ func (e *emailTypeNotifier) StartNotification() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *emailTypeNotifier) SendNotification() {
|
func (e *emailTypeNotifier) SendNotification() {
|
||||||
if e.entries != nil {
|
if e.entries != nil && len(e.entries) != 0 {
|
||||||
e.sendEntries(e.entries)
|
e.sendEntries(e.entries)
|
||||||
e.entries = nil
|
|
||||||
}
|
}
|
||||||
|
e.entries = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *emailTypeNotifier) Levels() []log.Level {
|
func (e *emailTypeNotifier) Levels() []log.Level {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue