Commit 6144fefe authored by Etienne Nadji's avatar Etienne Nadji
Browse files

Mettre à jour source/guide/en/logging.rst, source/index.rst files

parent bfd30d05
PyScribus logging
=================
Activation
----------
::
import pyscribus.logs as logs
# Initialize the logs
logs.init_logging("mylog.log", "%(asctime)s:%(message)s")
# From now, if PyScribus want to log something, it will log
# to mylog.log instead of printing on STDOUT
# Changing the level of the logger used by PyScribus
logger = logs.getLogger()
Configuration
----------
The logger used by PyScribus is a standard library logger (from ``logging``
module). By default, this logger is verbose, as its logs every level of
messages (starting from ``logging.DEBUG ``).
::
import logging
import pyscribus.logs as logs
# Initialize the logs
logs.init_logging("mylog.log", "%(asctime)s:%(levelname)s:%(message)s")
# Get the logger used by PyScribus
logger = logs.getLogger()
# Changing the level of the logger
logger.setLevel(logging.WARNING)
......@@ -23,6 +23,7 @@ User Guide
guide/en/quickstart.rst
guide/en/psm.rst
guide/en/templating.rst
guide/en/logging.rst
examples/index.rst
forhumans.rst
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment