summaryrefslogtreecommitdiff
path: root/systemd/journal.py
diff options
context:
space:
mode:
Diffstat (limited to 'systemd/journal.py')
-rw-r--r--systemd/journal.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/systemd/journal.py b/systemd/journal.py
index 7105818..2b79b20 100644
--- a/systemd/journal.py
+++ b/systemd/journal.py
@@ -421,8 +421,7 @@ def stream(identifier, priority=LOG_DEBUG, level_prefix=False):
>>> from systemd import journal
>>> stream = journal.stream('myapp')
- >>> stream.write('message...\n')
- 11
+ >>> res = stream.write('message...\n')
will produce the following message in the journal::
@@ -433,7 +432,7 @@ def stream(identifier, priority=LOG_DEBUG, level_prefix=False):
Using the interface with print might be more convinient:
>>> from __future__ import print_function
- >>> print('message...', file=stream)
+ >>> print('message...', file=stream) # doctest: +SKIP
priority is the syslog priority, one of `LOG_EMERG`,
`LOG_ALERT`, `LOG_CRIT`, `LOG_ERR`, `LOG_WARNING`,