Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion nimp/nimp_cli.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2014-2019 Dontnod Entertainment
# Copyright © 2014–2025 Dontnod Entertainment

# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
Expand All @@ -25,6 +25,7 @@
import logging
import os
import platform
from rich.logging import RichHandler
import sys
import time
import traceback
Expand Down Expand Up @@ -72,6 +73,8 @@ def main(argv=sys.argv):
nimp_monitor = nimp.sys.process.Monitor()
nimp_monitor.start()

logging.basicConfig(level=logging.INFO, format='%(message)s', datefmt='[%X]',
handlers=[RichHandler()])
logging.getLogger('urllib3').setLevel(logging.INFO)
logging.getLogger('torf').setLevel(logging.INFO)

Expand Down
13 changes: 7 additions & 6 deletions nimp/summary.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2014-2022 Dontnod Entertainment
# Copyright © 2014–2025 Dontnod Entertainment

# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
Expand Down Expand Up @@ -119,11 +119,12 @@ def __enter__(self):

root_logger = logging.root

# Need to do that because some log may already have been output
for handler in list(logging.root.handlers):
root_logger.removeHandler(handler)

logging.basicConfig(format='%(asctime)s [%(levelname)s] %(message)s', level=log_level)
# If stdout is not a TTY, fall back to the old log format. This is just in case there
# are external tools that parse the output, we don’t want to break them.
if not sys.stdout.isatty():
for handler in list(logging.root.handlers):
root_logger.removeHandler(handler)
logging.basicConfig(format='%(asctime)s [%(levelname)s] %(message)s', level=log_level)

child_processes_logger = logging.getLogger('child_processes')
child_processes_logger.propagate = False
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ keywords = ["build", "compile", "unrealengine"]
dynamic = ["version"]

dependencies = [
"rich",
"glob2",
"packaging",
"python-magic",
Expand Down