From 3d97ea80b8f17db8dc3fd1c735b06a99c699298c Mon Sep 17 00:00:00 2001 From: Erik Johnson Date: Thu, 7 Apr 2016 19:07:00 -0500 Subject: [PATCH] Add information on setting logfile in i3pystatus.status.Status() constructor --- docs/configuration.rst | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/configuration.rst b/docs/configuration.rst index 30ade98..4dd04ac 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -233,7 +233,23 @@ to files in your home directory named ``.i3pystatus-``. Some modules might log additional information. -.. rubric:: Log level +Setting a specific logfile +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When instantiating your ``Status`` object, the path to a log file can be +specified. If this is done, then log messages will be sent to that file and not +to an ``.i3pystatus-`` file in your home directory. This is +useful in that it helps keep your home directory from becoming cluttered with +files containing errors. + +.. code-block:: python + + from i3pystatus import Status + + status = Status(logfile='/home/username/var/i3pystatus.log') + +Log level +~~~~~~~~~ Every module has a ``log_level`` option which sets the *minimum* severity required for an event to be logged.