Skip to content

Commit

Permalink
chore(log): Slight improvement of log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
ferdinandjarisch authored and rumpelsepp committed Oct 26, 2023
1 parent 98063ab commit dc8e90a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/gallia/commands/scan/uds/sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ async def main(self, args: Namespace) -> None:
sys.exit(1)

try:
logger.info(f"Attempting to change to session {session:#04x}")
logger.debug(f"Attempting to change to session {session:#04x}")
resp = await self.set_session_with_hooks_handling(
session, args.with_hooks
)
Expand Down
1 change: 1 addition & 0 deletions src/gallia/dumpcap.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ async def sync(self, timeout: float = 1) -> None:
await asyncio.wait_for(self.ready_event.wait(), timeout)

async def stop(self) -> None:
logger.info(f"Waiting {self.cleanup}s for dumpcap to receive all packets")
await asyncio.sleep(self.cleanup)
try:
self.proc.terminate()
Expand Down
4 changes: 3 additions & 1 deletion src/gallia/services/uds/core/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ async def request_unsafe(

# Avoid pasting this very line in every error branch.
if i > 0:
logger.debug(f"retrying {i} from {max_retry}…")
logger.info(
f"Requesting UDS PDU failed; retrying: {i} from {max_retry}…"
)
try:
logger.debug(request.pdu.hex(), extra={"tags": ["write", "uds"] + tags})
raw_resp = await self.transport.request_unsafe(
Expand Down
2 changes: 1 addition & 1 deletion src/gallia/services/uds/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ async def setup(self) -> None:
self.randomize()

logger.notice(f"Initialized random UDS server with seed {self.seed}")
logger.info(
logger.notice(
json.dumps(
{
int_repr(session): {
Expand Down

0 comments on commit dc8e90a

Please sign in to comment.