Skip to content

Commit

Permalink
Use self._logger for logging
Browse files Browse the repository at this point in the history
This fixes #60
  • Loading branch information
eyal0 committed Jan 13, 2021
1 parent 1342004 commit 80d4de5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions octoprint_slic3r/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ class Slic3rPlugin(octoprint.plugin.SlicerPlugin,
octoprint.plugin.StartupPlugin):

def __init__(self):
self._slic3r_logger = logging.getLogger("octoprint.plugins.slic3r.engine")

# setup job tracking across threads
import threading
self._slicing_commands = dict()
Expand Down Expand Up @@ -107,6 +105,7 @@ def get_update_information(self):
##~~ StartupPlugin API

def on_startup(self, host, port):
self._slic3r_logger = self._logger
# setup our custom logger
slic3r_logging_handler = logging.handlers.RotatingFileHandler(self._settings.get_plugin_logfile_path(postfix="engine"), maxBytes=2*1024*1024)
slic3r_logging_handler.setFormatter(logging.Formatter("%(asctime)s %(message)s"))
Expand Down

0 comments on commit 80d4de5

Please sign in to comment.