Skip to content

Commit

Permalink
Update formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
jreed1701 committed Mar 29, 2024
1 parent 80e9024 commit 0d008f1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion application/api/v1/blueprints/architect.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def agent_info():
game["update_required"] = "ERROR"
logger.error(
f"Unable to retrieve game info for game_steam_id: {game_steam_id}",
exc_info=True
exc_info=True,
)

info: dict = platform_dict
Expand Down
4 changes: 2 additions & 2 deletions application/common/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ class FileModes(Enum):
# Logging
DEFAULT_LOG_LEVEL = logging.NOTSET
DEFAULT_LOG_DATE_FORMAT = "%m/%d/%Y %I:%M:%S %p"
DEFAULT_LOG_FORMAT = '%(filename)s:%(lineno)s %(levelname)s:%(message)s'
DEFAULT_LOG_SIZE_BYTES = 1024 * KB_PER_MB * 64 # MB
DEFAULT_LOG_FORMAT = "%(filename)s:%(lineno)s %(levelname)s:%(message)s"
DEFAULT_LOG_SIZE_BYTES = 1024 * KB_PER_MB * 64 # MB

# Controls not meant to be hooked up to GUI. Just for dev/debug:
ENABLE_TIMEIT_PRINTS = False
Expand Down
9 changes: 5 additions & 4 deletions application/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def _handle_migrations(flask_app: Flask):

command.upgrade(alembic_cfg, "head")


def _handle_logging():
"""Update log configuration."""
# Remove all handlers associated with the root logger object.
Expand Down Expand Up @@ -95,10 +96,10 @@ def _handle_logging():
# File handler
file_handler = ConcurrentRotatingFileHandler(
log_file_full_path,
mode='a',
encoding='utf-8',
mode="a",
encoding="utf-8",
maxBytes=constants.DEFAULT_LOG_SIZE_BYTES,
backupCount=5
backupCount=5,
)
file_handler.setLevel(logger_level)
file_handler.setFormatter(formatter)
Expand All @@ -111,8 +112,8 @@ def _handle_logging():
logger.addHandler(stdout_handler)
logger.addHandler(file_handler)

def create_app(config=None):

def create_app(config=None):
if config is None:
config = DefaultConfig("python")
logger.info("WARNING. Missing Configuration. Initializing with default...")
Expand Down

0 comments on commit 0d008f1

Please sign in to comment.