Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Etienne Nadji
PyScribus
Commits
0d8cf496
Commit
0d8cf496
authored
Dec 01, 2020
by
Etienne Nadji
Browse files
Merge branch 'master' of
https://framagit.org/etnadji/pyscribus
parents
a175083e
d9cb709b
Changes
2
Hide whitespace changes
Inline
Side-by-side
source/guide/en/logging.rst
0 → 100644
View file @
0d8cf496
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)
source/index.rst
View file @
0d8cf496
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment