src.app_logging.structured_logger module

class src.app_logging.structured_logger.SlackNameCache(client, ttl_seconds: int = 3600)[source]

Bases: object

Caches user/channel lookups to avoid wasting resources.

channel_name(channel_id: str | None) str | None[source]
user_name(user_id: str | None) str | None[source]
src.app_logging.structured_logger.install_structured_message_logging(app, client, cfg=None, log_file: str = None)[source]

Installs a Bolt event handler that saves messages to MongoDB, organized by workspace and channel. Also optionally adds emoji reactions via LLM.