Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions docs/source/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ other value will be considered as "false".
When a config option is a choice, it means you can provide only one of the
values defined as valid for this option, or Sopel will complain about it.

.. note::

The INI file structure Sopel uses does **not** require quoting of values,
except for specific cases such as the escaped list value shown above.
Quoting a value unnecessarily can lead to unexpected behavior such as an
absolute pathname being interpreted as relative to Sopel's home directory.

.. __: https://docs.python.org/3/library/configparser.html#supported-ini-file-structure


Expand Down Expand Up @@ -190,7 +197,7 @@ you need to set :attr:`~CoreSection.use_ssl` to true::
[core]
use_ssl = yes
verify_ssl = yes
ca_certs = path/to/sopel/ca_certs.pem
ca_certs = /path/to/sopel/ca_certs.pem

In that case:

Expand Down Expand Up @@ -400,7 +407,7 @@ and the required credentials:
(``UserServ`` by default)

Multi-stage
-------------
-----------

In some cases, an IRC bot needs to use both server-based and
nick-based authentication.
Expand Down Expand Up @@ -588,6 +595,7 @@ Example of configuration for logging::
logging_level = INFO
logging_format = [%(asctime)s] %(levelname)s - %(message)s
logging_datefmt = %Y-%m-%d %H:%M:%S
logdir = /path/to/logs

.. versionadded:: 7.0

Expand Down Expand Up @@ -631,7 +639,10 @@ Raw Logs
--------

It is possible to store raw logs of what Sopel receives and sends by setting
the flag :attr:`~CoreSection.log_raw` to true.
the flag :attr:`~CoreSection.log_raw` to true::

[core]
log_raw = on

In that case, IRC messages received and sent are stored into a file named
``<base>.raw.log``, located in the log directory.
Expand Down
10 changes: 10 additions & 0 deletions sopel/config/core_section.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,9 @@ class CoreSection(StaticSection):

If not specified, Sopel will try to find the certificate trust store
itself from a set of known locations.

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.
"""

channels = ListAttribute('channels')
Expand Down Expand Up @@ -685,6 +688,8 @@ def homedir(self):
log_raw = ValidatedAttribute('log_raw', bool, default=False)
"""Whether a log of raw lines as sent and received should be kept.

:default: ``no``

To enable this logging:

.. code-block:: ini
Expand All @@ -700,6 +705,11 @@ def homedir(self):
logdir = FilenameAttribute('logdir', directory=True, default='logs')
"""Directory in which to place logs.

: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.

.. seealso::

The :ref:`Logging` chapter.
Expand Down
6 changes: 5 additions & 1 deletion sopel/modules/ip.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@

class GeoipSection(types.StaticSection):
GeoIP_db_path = types.FilenameAttribute('GeoIP_db_path', directory=True)
"""Path of the directory containing the GeoIP database files."""
"""Path of the directory containing the GeoIP database files.

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.
"""


def configure(config):
Expand Down
1 change: 1 addition & 0 deletions sopel/modules/meetbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class MeetbotSection(types.StaticSection):

meeting_log_path = types.FilenameAttribute(
"meeting_log_path",
relative=False,
directory=True,
default="~/www/meetings")
"""Path to meeting logs storage directory.
Expand Down