Skip to content

Commit

Permalink
Improved logs
Browse files Browse the repository at this point in the history
Signed-off-by: Cédric Foellmi <cedric@onekiloparsec.dev>
  • Loading branch information
onekiloparsec committed Apr 12, 2024
1 parent b336e93 commit e745cca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions arcsecond/uploader/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@


def get_oort_logger(debug=False) -> Logger:
suffix = '(test)' if os.environ.get('OORT_TESTS') == '1' else ''
logger = getLogger(suffix)
suffix = ' (test)' if os.environ.get('OORT_TESTS') == '1' else ''
logger = getLogger('arcsecond' + suffix)
logger.setLevel(DEBUG if debug else INFO)

if len(logger.handlers) == 0:
Expand Down
4 changes: 2 additions & 2 deletions arcsecond/uploader/walker.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ def walk(context: Context, folder_string: str):
return

uploads = __walk_second_pass(context, root_path, file_paths)
msg = f"{log_prefix} uploads successes: {len(uploads['succeeded'])}, "
msg += f"skipped: {len(uploads['skipped'])}, failures:{len(uploads['failed'])} failed.\n"
msg = f"{log_prefix} uploads succeeded: {len(uploads['succeeded'])}, "
msg += f"skipped: {len(uploads['skipped'])}, failed:{len(uploads['failed'])} failed.\n"
logger.info(msg)

if len(uploads['skipped']) > 0:
Expand Down

0 comments on commit e745cca

Please sign in to comment.