Skip to content

Commit

Permalink
switch to file logger
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanthecoder committed Oct 16, 2024
1 parent 54094a3 commit d25dd6d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions api/src/opentrons/util/logging_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ def _buildroot_config(level_value: int) -> Dict[str, Any]:
# Import systemd.journald here since it is generally unavailble on non
# linux systems and we probably don't want to use it on linux desktops
# either
sensor_log_filename = CONFIG["sensor_log_file"]
return {
"version": 1,
"disable_existing_loggers": False,
Expand Down Expand Up @@ -123,10 +124,12 @@ def _buildroot_config(level_value: int) -> Dict[str, Any]:
"SYSLOG_IDENTIFIER": "opentrons-api-serial-usbbin",
},
"sensor": {
"class": "systemd.journal.JournalHandler",
"class": "logging.handlers.RotatingFileHandler",
"formatter": "basic",
"filename": sensor_log_filename,
"maxBytes": 1000000,
"level": logging.DEBUG,
"formatter": "message_only",
"SYSLOG_IDENTIFIER": "opentrons-api-sensor",
"backupCount": 3,
},
},
"loggers": {
Expand Down

0 comments on commit d25dd6d

Please sign in to comment.