From cae43033e4969ddd2906185d40a7fc6e39b574ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gy=C3=B6rgy=20Kiss?= Date: Mon, 6 Dec 2021 20:10:00 +0100 Subject: [PATCH] Don't format count numbers to hex It's more natural to show those in decimal. --- unblob/cli.py | 4 ++-- unblob/processing.py | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/unblob/cli.py b/unblob/cli.py index c9e947113e..c3f3ffbbc9 100644 --- a/unblob/cli.py +++ b/unblob/cli.py @@ -6,7 +6,7 @@ import click from structlog import get_logger -from .logging import configure_logger +from .logging import configure_logger, noformat from .processing import DEFAULT_DEPTH, process_file from .state import exit_code_var @@ -37,7 +37,7 @@ @click.option("-v", "--verbose", is_flag=True, help="Verbose mode, enable debug logs.") def cli(files: Tuple[Path], extract_root: Path, depth: int, verbose: bool): configure_logger(verbose, extract_root) - logger.info("Start processing files", count=len(files)) + logger.info("Start processing files", count=noformat(len(files))) for path in files: root = path if path.is_dir() else path.parent process_file(root, path, extract_root, max_depth=depth) diff --git a/unblob/processing.py b/unblob/processing.py index 5a195db471..3f19865aa7 100644 --- a/unblob/processing.py +++ b/unblob/processing.py @@ -8,6 +8,7 @@ from .extractor import carve_unknown_chunks, extract_valid_chunks, make_extract_dir from .finder import search_chunks_by_priority from .iter_utils import pairwise +from .logging import noformat from .models import UnknownChunk, ValidChunk logger = get_logger() @@ -78,8 +79,8 @@ def remove_inner_chunks(chunks: List[ValidChunk]) -> List[ValidChunk]: removed_count = len(chunks) - outer_count logger.info( "Removed inner chunks", - outer_chunk_count=outer_count, - removed_inner_chunk_count=removed_count, + outer_chunk_count=noformat(outer_count), + removed_inner_chunk_count=noformat(removed_count), ) return outer_chunks