Skip to content

Commit

Permalink
Python Transport: modify default log level
Browse files Browse the repository at this point in the history
Debug log level is for debug purposes and must be set explicitely.
Debug level create a log every received message.
If transport is started as a systemd service, it generates
log of processing for journald and creatd big log files.
  • Loading branch information
GwendalRaoul committed Jul 8, 2019
1 parent 736af0b commit 4255537
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions python_transport/wirepas_gateway/dbus_print_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def on_data_received(
data,
):
""" logs incoming data from the WM network """
self.logger.debug(
self.logger.info(
"[{}] Sink {} FROM {} TO {} on EP {} Data Size is {}".format(
datetime.utcfromtimestamp(int(timestamp / 1000)).strftime(
"%Y-%m-%d %H:%M:%S"
Expand Down Expand Up @@ -57,7 +57,7 @@ def main(log_name="print_client"):
try:
debug_level = os.environ["DEBUG_LEVEL"]
except KeyError:
debug_level = "debug"
debug_level = "info"

logger = setup_log(log_name, level=debug_level)
obj = PrintClient()
Expand Down
2 changes: 1 addition & 1 deletion python_transport/wirepas_gateway/transport_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ def main():
try:
debug_level = os.environ["DEBUG_LEVEL"]
except KeyError:
debug_level = "debug"
debug_level = "info"

logger = setup_log("transport_service", level=debug_level)

Expand Down

0 comments on commit 4255537

Please sign in to comment.