codewars Logger

class codewars.logger.Logger(appname: str = 'Application', mode: str = 'DEBUG', write: bool = False)[source]

This class logs to console / file or both. About the log structure ———————– write is a usefull attribute to set up a quick all-time-log. This log mode writes to your terminal but also to a .log file. This means whenever your code breaks the logs are still available to you on your machine. The location of this file depends on where you installed the codewars package. For a virtualenv environment usually this will be venv/lib/python3.*/site-packages/codewars*/codewars/logger/logs/appname.log

What does write actually write?
  • DEBUG

  • INFO

  • WARNING

  • ERROR

  • CRITICAL

Note

Write is the only mode that actually

The rest of the documentation page will provide more information.

critical(msg)[source]

Logs a message on CRITICAL level.

debug(msg)[source]

Logs a message on DEBUG level.

error(msg)[source]

Logs a message on ERROR level.

info(msg)[source]

Logs a message on INFO level.

warning(msg)[source]

Logs a message on WARNING level.