mirror of
https://github.com/containrrr/watchtower.git
synced 2026-03-01 18:30:17 +01:00
make notify log hook opt-in
This commit is contained in:
parent
102566032a
commit
f817098cd5
5 changed files with 22 additions and 14 deletions
|
|
@ -13,7 +13,7 @@ import (
|
|||
|
||||
// NewNotifier creates and returns a new Notifier, using global configuration.
|
||||
func NewNotifier(c *cobra.Command) ty.Notifier {
|
||||
f := c.PersistentFlags()
|
||||
f := c.Flags()
|
||||
|
||||
level, _ := f.GetString("notifications-level")
|
||||
logLevel, err := log.ParseLevel(level)
|
||||
|
|
@ -35,7 +35,7 @@ func NewNotifier(c *cobra.Command) ty.Notifier {
|
|||
data := GetTemplateData(c)
|
||||
urls, delay := AppendLegacyUrls(urls, c, data.Title)
|
||||
|
||||
return newShoutrrrNotifier(tplString, levels, !reportTemplate, data, delay, stdout, urls...)
|
||||
return createNotifier(urls, levels, tplString, !reportTemplate, data, stdout, delay)
|
||||
}
|
||||
|
||||
// AppendLegacyUrls creates shoutrrr equivalent URLs from legacy notification flags
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue