summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/README.md b/README.md
index 4d6daae..ce41389 100644
--- a/README.md
+++ b/README.md
@@ -85,6 +85,14 @@ Notes:
This might happen if there are no arguments or one of them is
invalid.
+A handler class for the Python logging framework is also provided:
+
+ import logging
+ from systemd import journal
+ logger = logging.getLogger('custom_logger_name')
+ logger.addHandler(journal.JournalHandler())
+ logger.warning("Some message: %s", 'detail')
+
Documentation
=============