forked from LiveCarta/BookConverter
Wrote documentation for every func/class in .py
This commit is contained in:
@@ -3,6 +3,7 @@ import logging
|
||||
|
||||
|
||||
class ColoredFormatter(logging.Formatter):
|
||||
""" Class to prettify logger and command line output """
|
||||
MAPPING = {
|
||||
'DEBUG': 37, # white
|
||||
'INFO': 36, # cyan
|
||||
@@ -61,9 +62,7 @@ class BookLogger:
|
||||
self.logger.log(msg=message, level=logging_level, stacklevel=2)
|
||||
|
||||
def log_error_to_main_log(self, message=''):
|
||||
"""
|
||||
Method for logging error to main log file.
|
||||
"""
|
||||
""" Method for logging error to main log file. """
|
||||
if self.main_logger:
|
||||
if not message:
|
||||
message = f'Error in book conversion. Check log file.'
|
||||
@@ -71,6 +70,8 @@ class BookLogger:
|
||||
|
||||
|
||||
class BookStatusWrapper:
|
||||
"""Class sets/updates statuses of Converter on Platform"""
|
||||
|
||||
def __init__(self, access, logger_object, book_id=0):
|
||||
self.access = access
|
||||
self.logger_object = logger_object
|
||||
|
||||
Reference in New Issue
Block a user