1
0
mirror of https://github.com/containrrr/watchtower.git synced 2025-07-15 23:54:22 +02:00

Do not send an email notification when no messages have been logged.

This commit is contained in:
Fabrizio Steiner
2018-01-01 09:34:53 +01:00
parent 4c63746feb
commit a23f49f444

View File

@ -87,10 +87,10 @@ func (e *emailTypeNotifier) StartNotification() {
}
func (e *emailTypeNotifier) SendNotification() {
if e.entries != nil {
if e.entries != nil && len(e.entries) != 0 {
e.sendEntries(e.entries)
e.entries = nil
}
e.entries = nil
}
func (e *emailTypeNotifier) Levels() []log.Level {