Merge pull request #141 from v2tec/do-not-send-empty-mails

Do not send an email notification when no messages have been logged.
This commit is contained in:
stffabi 2018-01-05 22:01:20 +01:00 committed by GitHub
commit bbd24e3199
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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 {