Skip to content

Commit

Permalink
Update for new logging
Browse files Browse the repository at this point in the history
  • Loading branch information
crysxd committed Nov 28, 2023
1 parent 435ee90 commit 8aa763e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
8 changes: 4 additions & 4 deletions octoapp/sentry.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,22 +91,22 @@ def _beforeSendFilter(event, hint):

@staticmethod
def Info(tag, msg):
paddedTag = "{:<15}".format(" " + tag).upper()
paddedTag = "{:<15}".format(tag).upper()
Sentry.Logger.info(paddedTag + " | " + msg)

@staticmethod
def Debug(tag, msg):
paddedTag = "{:<14}".format(tag).upper()
paddedTag = "{:<15}".format(tag).upper()
Sentry.Logger.debug(paddedTag + " | " + msg)

@staticmethod
def Warn(tag, msg):
paddedTag = "{:<15}".format(" " + tag).upper()
paddedTag = "{:<15}".format(tag).upper()
Sentry.Logger.warning(paddedTag + " | " + msg)

@staticmethod
def Error(tag, msg):
paddedTag = "{:<14}".format(tag).upper()
paddedTag = "{:<15}".format(tag).upper()
Sentry.Logger.error(paddedTag + " | " + msg)


Expand Down
6 changes: 2 additions & 4 deletions octoprint_octoapp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def on_startup(self, host, port):
Sentry.Info("PLUGIN", "OctoApp starting %s" % self._plugin_version)

# Init the static snapshot helper
WebcamHelper.Init(self._logger, OctoPrintWebcamHelper(self._settings))
WebcamHelper.Init(OctoPrintWebcamHelper(self._settings))

# Setup our printer state object, that implements the interface.
printerStateObject = PrinterStateObject(self._printer)
Expand Down Expand Up @@ -274,9 +274,7 @@ def _initLogger(self):
self._logger_handler.setLevel(logging.DEBUG)
self._logger.addHandler(self._logger_handler)
self._logger.setLevel(logging.DEBUG)
self._logger.propagate = True


self._logger.propagate = False


__plugin_name__ = "OctoApp"
Expand Down

0 comments on commit 8aa763e

Please sign in to comment.