|
Ark
|
Classes | |
| class | bcolors |
| This class contains color codes to be used in the log messages to provide visual cues for different log levels. More... | |
| class | CustomFormatter |
| CustomFormatter for applying color coding to log levels and including timestamp. More... | |
Functions | |
| None | ok (logging.Logger self, str message, *object args, **object kwargs) |
| Custom log method for the OK log level. | |
| str | apply_panda_style (str text) |
| None | log_panda (logging.Logger self, str message, *object args, **object kwargs) |
| logging.Logger | setup_logger () |
| Configures and returns a global logger with a custom formatter for colorized output. | |
| str | query (str msg) |
| Prompts the user for input after printing a message to the console. | |
Variables | |
| int | OK_LEVEL_NUM = 25 |
| ok | |
| panda | |
| logging.Logger | log = setup_logger() |
| query | |
| logging.Logger | usrin = log.query("ready?") |
| str ark.tools.log.apply_panda_style | ( | str | text | ) |
| None ark.tools.log.log_panda | ( | logging.Logger | self, |
| str | message, | ||
| *object | args, | ||
| **object | kwargs ) |
| None ark.tools.log.ok | ( | logging.Logger | self, |
| str | message, | ||
| *object | args, | ||
| **object | kwargs ) |
Custom log method for the OK log level.
This method adds a custom logging level between INFO and WARNING. It is used to log messages that indicate normal operations, but with higher importance than INFO.
| message | The log message. |
| args | Additional arguments for formatting the message. |
| kwargs | Additional keyword arguments. |
| str ark.tools.log.query | ( | str | msg | ) |
Prompts the user for input after printing a message to the console.
This function logs the action of querying the user, prints the provided message to the console, and waits for the user's input.
| msg | The message to display to the user. |
| logging.Logger ark.tools.log.setup_logger | ( | ) |
Configures and returns a global logger with a custom formatter for colorized output.
This function sets up a logger that includes the custom colorized formatter, and configures it to output logs to the console. It uses the DEBUG level as the minimum level to capture logs.
| logging.Logger ark.tools.log.log = setup_logger() |
| ark.tools.log.ok |
| int ark.tools.log.OK_LEVEL_NUM = 25 |
| ark.tools.log.panda |
| ark.tools.log.query |
| logging.Logger ark.tools.log.usrin = log.query("ready?") |