Made the notification level flag global for all notification types.

This commit is contained in:
Fabrizio Steiner 2018-03-02 13:08:40 +01:00
parent 4ac08dfb30
commit e1ead2f46f
5 changed files with 26 additions and 24 deletions

12
main.go
View file

@ -96,6 +96,12 @@ func main() {
Usage: "notification types to send (valid: email, slack)",
EnvVar: "WATCHTOWER_NOTIFICATIONS",
},
cli.StringFlag{
Name: "notifications-level",
Usage: "The log level used for sending notifications. Possible values: \"panic\", \"fatal\", \"error\", \"warn\", \"info\" or \"debug\"",
EnvVar: "WATCHTOWER_NOTIFICATIONS_LEVEL",
Value: "info",
},
cli.StringFlag{
Name: "notification-email-from",
Usage: "Address to send notification e-mails from",
@ -147,12 +153,6 @@ func main() {
EnvVar: "WATCHTOWER_NOTIFICATION_SLACK_IDENTIFIER",
Value: "watchtower",
},
cli.StringFlag{
Name: "notification-slack-level",
Usage: "The log level used for sending notifications through Slack. Default if omitted is \"info\". Possible values: \"panic\",\"fatal\",\"error\",\"warn\",\"info\" or \"debug\"",
EnvVar: "WATCHTOWER_NOTIFICATION_SLACK_LEVEL",
Value: "info",
},
}
if err := app.Run(os.Args); err != nil {