Configuring the Gordon Janitor Service¶
Example Configuration¶
An example of a gordon-janitor.toml
file:
# Gordon Janitor Core Config
[core]
plugins = ["foo.plugin"]
debug = false
[core.logging]
level = "info"
handlers = ["syslog"]
# Plugin Config
["foo"]
# global config to the general "foo" package
bar = baz
["foo.plugin"]
# specific plugin config within "foo" package
baz = bla
You may choose to have a gordon-janitor-user.toml
file for development. All tables are deep merged into gordon-janitor.toml
, to limit the amount of config duplication needed. For example, you can override core.debug
without having to redeclare which plugins you’d like to run.
[core]
debug = true
[core.logging]
level = "debug"
handlers = ["stream"]
Supported Configuration¶
The following sections are supported:
core¶
-
plugins
=LIST-OF-STRINGS
¶ Plugins that the Gordon Janitor service needs to load. If a plugin is not listed, the Janitor will skip it even if there’s configuration.
The strings must match the plugin’s config key. See the plugin’s documentation for config key names.
-
debug
=true|false
¶ Whether or not to run the Gordon Janitor service in
debug
mode.If
true
, the Janitor will continue running even if installed & configured plugins can not be loaded. Plugin exceptions will be logged as warnings with tracebacks.If
false
, the Janitor will exit out if it can’t load one or more plugins.
core.logging¶
-
level
=info(default)|debug|warning|error|critical
¶ Any log level that is supported by the Python standard
logging
library.
-
handlers
=LIST-OF-STRINGS
¶ handlers
support any of the following handlers:stream
,syslog
, andstackdriver
. Multiple handlers are supported. Defaults tosyslog
if none are defined.Note
If
stackdriver
is selected,ulogger[stackdriver]
needs to be installed as its dependencies are not installed by default.