Skip to content

Commit

Permalink
Repair PrintClient logging system (#268)
Browse files Browse the repository at this point in the history
  • Loading branch information
LePailleurThibault authored Apr 12, 2024
1 parent 0754475 commit 5edffec
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions python_transport/wirepas_gateway/dbus_print_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ def on_data_received(
):
""" logs incoming data from the WM network """
logging.info(
"[%s] Sink %s FROM %d TO %d on EP %d Data Size is %d",
datetime.utcfromtimestamp(int(timestamp / 1000)).strftime(
"%Y-%m-%d %H:%M:%S"
),
"Sink %s FROM %d TO %d on EP %d Data Size is %d",
sink_id,
src,
dst,
Expand Down Expand Up @@ -70,15 +67,13 @@ def main():
pass

debug_level = "{0}".format(debug_level.upper())

# Create a "Print Client" object and enable his logger
obj = PrintClient()
logging.basicConfig(
format='%(asctime)s | [%(levelname)s] %(name)s@%(filename)s:%(lineno)d:%(message)s',
format='%(asctime)s | [%(levelname)s] %(message)s',
level=debug_level,
stream=sys.stdout
)
obj.run()

PrintClient().run()


if __name__ == "__main__":
Expand Down

0 comments on commit 5edffec

Please sign in to comment.