dran.config package#
Submodules#
dran.config.constants module#
dran.config.logging module#
- class dran.config.logging.LevelBasedFormatter[source]#
Bases:
FormatterA logging formatter that applies color-coded and level-specific formats for console output.
Each log level (DEBUG, INFO, WARNING, ERROR, CRITICAL) has its own distinct message style to improve readability in terminal output.
- format(record)[source]#
Format the specified record as text.
The record’s attribute dictionary is used as the operand to a string formatting operation which yields the returned string. Before formatting the dictionary, a couple of preparatory steps are carried out. The message attribute of the record is computed using LogRecord.getMessage(). If the formatting string uses the time (as determined by a call to usesTime(), formatTime() is called to format the event time. If there is exception information, it is formatted using formatException() and appended to the message.
- dran.config.logging.load_prog(prog, log)[source]#
Print a formatted message indicating the program being loaded. Keep this free of OS-specific calls like clearing the console.
- dran.config.logging.setup_logger(debug=False, project_name='DRAN', log_file='LOGGING.txt')[source]#
Set up and configure the project logger.