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
11 changes: 8 additions & 3 deletions ezFlashCLI/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,16 @@ def __init__(self):

json_file.close()

log_config = {
"level": logging.INFO,
"format": "%(levelname)s [%(name)s] %(message)s",
}

# set the verbosity
if self.args.verbose:
logging.basicConfig(level=logging.DEBUG)
else:
logging.basicConfig(level=logging.INFO)
log_config["level"] = logging.DEBUG

logging.basicConfig(**log_config)

logging.info("{} v{}".format(self.__class__.__name__, __version__))
logging.info("By using the program you accept the SEGGER J-link™ license")
Expand Down
5 changes: 2 additions & 3 deletions ezFlashCLI/ezFlash/pyjlink.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,9 @@ def connect(self, serialno):
serialno = int(serialno)
except Exception as ex:
self.logger.debug(
"Failed to interpret JLink id: {}, will use default interface\nErr: {}".format(
serialno, ex
)
f"Failed to interpret JLink id: {serialno}, will use default interface"
)
self.logger.debug(f"Err: {ex}")
# return

if serialno:
Expand Down
Loading