src.utils.logger

๐Ÿฆ‰ AthenaAI is an AI-powered ensemble machine-learning trading bot for PocketOption, built on BinaryOptionsToolsV2 โ†’ Get it on GitLab
๐Ÿ’ฌ Need help? Join the Chipa Discord ยท โšก Go no-code with ChipaEditor

Source: src/utils/logger.py. Nine lines that give the whole codebase a shared logger.

setup_logger(name="AIBot", level=logging.INFO) -> logging.Logger

ParameterTypeDefaultMeaning
namestr"AIBot"Logger name passed to logging.getLogger()
levelintlogging.INFORoot log level

Calls logging.basicConfig() with:

  • format: "%(asctime)s โ”‚ %(levelname)-7s โ”‚ %(message)s"
  • date format: "%H:%M:%S" (time only, no date)

Returns the named logger. Side effects: configures the root logger (handler to stderr), so it affects all logging in the process. Because basicConfig is a no-op if the root logger already has handlers, calling setup_logger again with different arguments will not reconfigure the format.

log

Module-level instance: log = setup_logger() โ€” created at import time. Every other module does from ..utils.logger import log. Example output:

14:03:21 โ”‚ INFO    โ”‚ โ–ถ TRADE  CALL  $25.00  conf=66.2%  expiry=300s  regime=ranging  [no data yet]

Changing verbosity

To see DEBUG lines (e.g. check_win(...) raw results, indicator-misalignment messages), set the level before the bot starts:

import logging
from src.utils.logger import log
log.setLevel(logging.DEBUG)
logging.getLogger().setLevel(logging.DEBUG)  # root handler too

There is no env var or config field for log level.

See also

๐Ÿ’ฌ Unsure how this interacts with the rest of the configuration? Ask in the Chipa Discord โ€” or prototype strategies no-code with ChipaEditor.