Skip to content

Commit

Permalink
Don't format count numbers to hex
Browse files Browse the repository at this point in the history
It's more natural to show those in decimal.
  • Loading branch information
kissgyorgy committed Dec 6, 2021
1 parent ab43e08 commit cae4303
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions unblob/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down
5 changes: 3 additions & 2 deletions unblob/processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit cae4303

Please sign in to comment.