Repository navigation
Modules Logger
Logan Fick edited this page Feb 8, 2026
·
1 revision
Every handler context provides a pre-configured logger via ctx.logger.
from owlbot.api import on_command, CommandContext
@on_command("ping")
async def ping(ctx: CommandContext) -> None:
ctx.logger.info("Ping command invoked")
ctx.logger.debug("Processing ping for %s", ctx.user.display_name)
await ctx.owncast_client.send_message("pong")Module loggers are named owlbot.modules.<module_name>, matching the hierarchical scheme described on the Logging page. ctx.logger is equivalent to logging.getLogger("owlbot.modules.<module_name>").
ctx.logger respects the global log level set by the -v flag, so ctx.logger.debug(...) calls only appear when running in verbose mode.
Built-in Modules
Creating New Modules