Skip to content

Commit 66bb425

Browse files
author
hongjin.zhou
committed
Remove the debug log for reading each dlt message
Logging each read-out message is a mess in log, insteadly reading process message is enough to show the reading is under progress. In order to distinguish which file we are reading from, file name should also be printed out in progress message
1 parent 529fdb1 commit 66bb425

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

dlt/dlt.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -783,10 +783,11 @@ def _log_message_progress(self):
783783
"""Logs current message for progress information"""
784784
length = os.stat(self.filename).st_size
785785
logger.debug(
786-
"Processed %s messages (%s%% of %sfile), next message is apid %s, ctid %s",
786+
"Processed %s messages (%s%% of %sfile) from %s, next message is apid %s, ctid %s",
787787
self.position,
788788
int(100 * self.file_position / length),
789789
"live " if self.live_run else "",
790+
self.filename,
790791
self.msg.apid,
791792
self.msg.ctid,
792793
)
@@ -1052,10 +1053,6 @@ def py_dlt_file_main_loop(dlt_reader, limit=None, callback=None):
10521053
"""Main loop to read dlt messages from dlt file."""
10531054
try:
10541055
for msg in dlt_reader:
1055-
logger.debug(
1056-
"Message from position %d and counter %d: %s", dlt_reader.file_position, dlt_reader.counter, msg
1057-
)
1058-
10591056
# send the message to the callback and check whether we
10601057
# need to continue
10611058
if callback and not callback(msg):

0 commit comments

Comments
 (0)