Logs
pywa cloud logs --bot <bot-id>pywa cloud logs --bot <bot-id> --tail 500pywa cloud logs --bot <bot-id> --followIf you’re in a directory linked to a bot (see
Linking a directory to a bot), --bot isn’t
needed — it uses the linked bot.
This shows your running bot’s console output: pywa’s own startup banner, anything your handlers
log via the standard logging module, and any errors pywa itself logs (a failed handler, a
malformed update, and so on).
What this is, and isn’t
Section titled “What this is, and isn’t”Without --follow, each call is a point-in-time snapshot — the last --tail lines at the
moment you ran the command, defaulting to 200.
--follow keeps going until you press Ctrl+C, printing new lines as they show up — but it’s
polling underneath, not a persistent live-tail connection: every --interval seconds
(default 2), the CLI checks in for anything logged since its last check. This is usually not
something you’ll notice, but it does mean genuinely instant updates aren’t guaranteed (you may see
a line up to --interval seconds after it was actually logged), and there’s no persistent log
storage beyond what’s still available from your bot’s current run — neither logs nor
logs --follow remembers anything from before your bot last started.
If the bot has never been deployed, or isn’t currently running, logs returns a clear error
rather than an empty response — there’s a real difference between “nothing has been logged yet”
(empty output, totally normal for a freshly deployed bot) and “there’s nothing running to fetch
logs from at all.”
The dashboard’s Logs tab shows the same output, polling the same way --follow does — useful
when you want to glance at a bot’s logs without a terminal open.