Commit graph

17 commits

Author SHA1 Message Date
Gina Häußge
1de307e15d Log version, safe mode & plugins to log on log roll over
We want to make sure that information is ALWAYS in each and every log.
2017-02-24 10:53:16 +01:00
Gina Häußge
c8dfe363bc Only offer daemon subcommand on linux 2017-01-20 17:10:59 +01:00
Gina Häußge
42e3922053 Don't care about common params on CLI
--basedir, --config, --verbose, --safe may now come before or after
subcommands and should still be evaluated.

For the server commands (legacy, "server" and "daemon"), the same
should now hold true for the related parameters --host, --port, --debug,
--logging, --iknowwhatimdoing and also --pid (for daemon command).

While having the parameters belong to the individual commands and only
there (which is click's basic approach) is way more cleaner, too many people
were running into issues with that strict approach after all.

I just hope the somewhat hackish approach with context injection needed to
get the less strict version to work won't backfire badly in the long run.

See also #1633 and #1657
2016-12-16 12:18:05 +01:00
Gina Häußge
97bf331307 Add safe mode that disables all third party plugins
Can be enabled either through new --safe command line
parameter or through server.startOnceInSafeMode in
config.yaml

When running in safe mode the plugin manager will
only allow to disable or uninstall third party plugins. Enabling
third party plugins or installing new plugins is disabled.

That will hopefully allow for more straightforward recovery
in case of a misbehaving plugin.
2016-11-18 13:02:16 +01:00
Gina Häußge
e4d34f4130 Fix logging during settings initialization
We record the messages logged during that time to a recording
log handler, then playback anything we caught after startup.
2016-11-18 10:25:24 +01:00
Gina Häußge
76a04cbe9d Merge branch 'dev/python3B' of https://github.com/ByReaL/OctoPrint into pr/ByReaL/dev/python3B 2016-07-15 11:28:55 +02:00
MirceaDan
c33a9f9aa2 from __future__ import absolute_import, division, print_function
changed the behavior to import division and print to be consistent
across all app and similar with python 3.x
2016-07-15 00:16:58 -07:00
Gina Häußge
0fd510a51f Less scary message on config.yaml parsing error 2016-07-08 12:35:46 +02:00
Kyle Evans
75f8facb05 Make Server class octoprint_daemon-aware, make sure terminated() gets invoked on it upon SIGTERM and update respective test 2016-05-09 09:40:50 -05:00
Gina Häußge
3c2d2b579d Documention for CLI and its development 2015-10-29 17:37:05 +01:00
Gina Häußge
d9f0fb1667 Consolidated common options into custom decorators 2015-10-29 16:26:50 +01:00
Gina Häußge
f68ce34351 Moved urllib3 ssl message to more suitable logging location 2015-10-29 15:26:58 +01:00
Gina Häußge
56805ab13d Refactored Daemon helper, added status command and added unit tests for all of it 2015-10-29 12:45:58 +01:00
Gina Häußge
4476545a55 Forgot to specify default value for daemon pidfile 2015-10-29 09:53:15 +01:00
Gina Häußge
9c56b2fd4e Variable output verbosity via CLI parameter -v 2015-10-28 19:18:40 +01:00
Gina Häußge
55c0e2ca95 Fixed a couple of bugs with daemon and serve commands 2015-10-27 18:15:24 +01:00
Gina Häußge
2dd04574ce Moved CLI into its own module with submodules
Less chaos in one file
2015-10-27 18:08:27 +01:00