-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Describe the bug
Hello there
There's either an issue with the documentation or with the way loggers / shoutrrr are set inside the watchtower:latest container.
I'm using smpt in conjunction with gmail - app passwords.
Emails don't get sent, if the log level of WATCHTOWER_LOG_LEVEL is too high.
Steps to reproduce
The observation is the following:
services:
watchtower:
container_name: watchtower
image: containrrr/watchtower:latest
hostname: watchtower.home.lan
restart: always
environment:
- WATCHTOWER_MONITOR_ONLY=true
- WATCHTOWER_CLEANUP=false
- WATCHTOWER_POLL_INTERVAL=3600
- WATCHTOWER_NOTIFICATIONS_LEVEL=info
- WATCHTOWER_LOG_LEVEL=info
- WATCHTOWER_NOTIFICATION_URL=smtp://source-email@gmail.com:email-password@smtp.gmail.com:587/?fromAddress=source-email@gmail.com&toAddresses=target-email
volumes:
- "/etc/localtime:/etc/localtime:ro"
- "/var/run/docker.sock:/var/run/docker.sock"Will send me an email with this content:
Watchtower 1.7.1
Using notifications: smtp
Checking all containers (except explicitly disabled with label)
Scheduling first run: 2025-10-20 15:17:18 +0000 UTC
However, changing it to:
services:
watchtower:
container_name: watchtower
image: containrrr/watchtower:latest
hostname: watchtower.home.lan
restart: always
environment:
- WATCHTOWER_MONITOR_ONLY=true
- WATCHTOWER_CLEANUP=false
- WATCHTOWER_POLL_INTERVAL=3600
- WATCHTOWER_NOTIFICATIONS_LEVEL=info
- WATCHTOWER_LOG_LEVEL=warn
- WATCHTOWER_NOTIFICATION_URL=smtp://source-email@gmail.com:email-password@smtp.gmail.com:587/?fromAddress=source-email@gmail.com&toAddresses=target-email
volumes:
- "/etc/localtime:/etc/localtime:ro"
- "/var/run/docker.sock:/var/run/docker.sock"Does not give me said email.
Expected behavior
I'm assuming that the logger that connects to shoutrrr and then sends the email is chained to the logger that emits info to stdout / stderr. This would mean, if the logger for stdout / stderr rejects a log-message, it won't reach the shoutrrr logger after.
It would be helpful if:
- The documentation reflected that i.e. the
WATCHTOWER_NOTIFICATIONS_LEVELonly has an efffect if it's >=WATCHTOWER_LOG_LEVELor - The two loggers, the one that emits to stdout / stderr and the one that emits messages via shoutrrr are no longer chained.
Screenshots
No response
Environment
- Ubuntu 24.04.3 LTS
- Docker version 28.5.1, build e180ab
- watchtower:latest
Your logs
Log with `WATCHTOWER_LOG_LEVEL=info`
time="2025-10-20T14:17:18Z" level=info msg="Watchtower 1.7.1"
time="2025-10-20T14:17:18Z" level=info msg="Using notifications: smtp"
time="2025-10-20T14:17:18Z" level=info msg="Checking all containers (except explicitly disabled with label)"
time="2025-10-20T14:17:18Z" level=info msg="Scheduling first run: 2025-10-20 15:17:18 +0000 UTC"
time="2025-10-20T14:17:18Z" level=info msg="Note that the first check will be performed in 59 minutes, 59 seconds"
Log with `WATCHTOWER_LOG_LEVEL=warn`
<placeholder for empty logs>
Additional context
No response