Skip to content

Commit

Permalink
config.core_section: fix documentation of logdir option
Browse files Browse the repository at this point in the history
It is relative to the config's `homedir`, which is the config's parent
folder by default but can be changed.

While I was here: Added a note indicating why one might want to change
the `homedir` setting, for example to match service-unit conventions.
  • Loading branch information
dgw committed Nov 29, 2023
1 parent 7c84903 commit f48273b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions sopel/config/core_section.py
Original file line number Diff line number Diff line change
Expand Up @@ -756,8 +756,11 @@ class CoreSection(StaticSection):
def homedir(self):
"""The directory in which various files are stored at runtime.
By default, this is the same directory as the config file. It cannot be
changed at runtime.
Specifying the ``homedir`` option is useful for e.g. :doc:`running Sopel
as a system service </run/service>`.
If not set, the config file's parent directory will be used. This value
cannot be changed at runtime.
"""
return self._parent.homedir

Expand Down Expand Up @@ -824,7 +827,7 @@ def homedir(self):
:default: ``logs``
If the given value is not an absolute path, it will be interpreted relative
to the directory containing the config file with which Sopel was started.
to the :attr:`homedir` of the config file with which Sopel was started.
.. seealso::
Expand Down

0 comments on commit f48273b

Please sign in to comment.