diff options
Diffstat (limited to 'Doc/library/logging.rst')
-rw-r--r-- | Doc/library/logging.rst | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst index 8226661..554318a 100644 --- a/Doc/library/logging.rst +++ b/Doc/library/logging.rst @@ -1347,7 +1347,8 @@ Let's say you want to send logging events across a network, and handle them at the receiving end. A simple way of doing this is attaching a :class:`SocketHandler` instance to the root logger at the sending end:: - import logging, logging.handlers + import logging + import logging.handlers rootLogger = logging.getLogger('') rootLogger.setLevel(logging.DEBUG) @@ -2600,7 +2601,9 @@ properly preceded with the binary-encoded length, as the new logging configuration:: #!/usr/bin/env python - import socket, sys, struct + import socket + import struct + import sys data_to_send = open(sys.argv[1], "r").read() |