Commit 7de6a464 authored by Guillaume Seguin's avatar Guillaume Seguin

WIP #561: move log_path setting to pronsole and use it there

parent 00e2ebf6
...@@ -35,7 +35,8 @@ from serial import SerialException ...@@ -35,7 +35,8 @@ from serial import SerialException
from . import printcore from . import printcore
from .utils import install_locale, run_command, get_command_output, \ from .utils import install_locale, run_command, get_command_output, \
format_time, format_duration, RemainingTimeEstimator, \ format_time, format_duration, RemainingTimeEstimator, \
get_home_pos, parse_build_dimensions, parse_temperature_report get_home_pos, parse_build_dimensions, parse_temperature_report, \
setup_logging
install_locale('pronterface') install_locale('pronterface')
from .settings import Settings, BuildDimensionsSetting from .settings import Settings, BuildDimensionsSetting
from .power import powerset_print_start, powerset_print_stop from .power import powerset_print_start, powerset_print_stop
...@@ -706,6 +707,7 @@ class pronsole(cmd.Cmd): ...@@ -706,6 +707,7 @@ class pronsole(cmd.Cmd):
args = [arg for arg in args if not arg.startswith("-psn")] args = [arg for arg in args if not arg.startswith("-psn")]
args = parser.parse_args(args = args) args = parser.parse_args(args = args)
self.process_cmdline_arguments(args) self.process_cmdline_arguments(args)
setup_logging(sys.stdout, self.settings.log_path)
# -------------------------------------------------------------- # --------------------------------------------------------------
# Printer connection handling # Printer connection handling
......
...@@ -816,7 +816,6 @@ Printrun. If not, see <http://www.gnu.org/licenses/>.""" ...@@ -816,7 +816,6 @@ Printrun. If not, see <http://www.gnu.org/licenses/>."""
# -------------------------------------------------------------- # --------------------------------------------------------------
def _add_settings(self, size): def _add_settings(self, size):
self.settings._add(StringSetting("log_path", "", _("Log path"), _("Path to the log file. An empty path will log to the console."), "UI"))
self.settings._add(BooleanSetting("monitor", True, _("Monitor printer status"), _("Regularly monitor printer temperatures (required to have functional temperature graph or gauges)"), "Printer"), self.update_monitor) self.settings._add(BooleanSetting("monitor", True, _("Monitor printer status"), _("Regularly monitor printer temperatures (required to have functional temperature graph or gauges)"), "Printer"), self.update_monitor)
self.settings._add(StringSetting("simarrange_path", "", _("Simarrange command"), _("Path to the simarrange binary to use in the STL plater"), "External")) self.settings._add(StringSetting("simarrange_path", "", _("Simarrange command"), _("Path to the simarrange binary to use in the STL plater"), "External"))
self.settings._add(BooleanSetting("circular_bed", False, _("Circular build platform"), _("Draw a circular (or oval) build platform instead of a rectangular one"), "Printer"), self.update_bed_viz) self.settings._add(BooleanSetting("circular_bed", False, _("Circular build platform"), _("Draw a circular (or oval) build platform instead of a rectangular one"), "Printer"), self.update_bed_viz)
......
...@@ -275,6 +275,7 @@ class Settings(object): ...@@ -275,6 +275,7 @@ class Settings(object):
self._add(StringSetting("start_command", "", _("Start command"), _("Executable to run when the print is started"), "External")) self._add(StringSetting("start_command", "", _("Start command"), _("Executable to run when the print is started"), "External"))
self._add(StringSetting("final_command", "", _("Final command"), _("Executable to run when the print is finished"), "External")) self._add(StringSetting("final_command", "", _("Final command"), _("Executable to run when the print is finished"), "External"))
self._add(StringSetting("error_command", "", _("Error command"), _("Executable to run when an error occurs"), "External")) self._add(StringSetting("error_command", "", _("Error command"), _("Executable to run when an error occurs"), "External"))
self._add(StringSetting("log_path", "", _("Log path"), _("Path to the log file. An empty path will log to the console."), "UI"))
self._add(HiddenSetting("project_offset_x", 0.0)) self._add(HiddenSetting("project_offset_x", 0.0))
self._add(HiddenSetting("project_offset_y", 0.0)) self._add(HiddenSetting("project_offset_y", 0.0))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment