2008-01-18 14:49:54,033 d.e.f WARNING IP: 127.0.0.1 User: jim A message at WARNING level with 2 parameters
+.. _multiple-processes:
+
Logging to a single file from multiple processes
------------------------------------------------
:exc:`NotImplementedError`.
+.. _stream-handler:
+
StreamHandler
^^^^^^^^^^^^^
no output, so an explicit :meth:`flush` call may be needed at times.
+.. _file-handler:
+
FileHandler
^^^^^^^^^^^
:class:`StreamHandler`.
-.. class:: FileHandler(filename, mode='a', encoding=None, delay=0)
+.. class:: FileHandler(filename, mode='a', encoding=None, delay=False)
Returns a new instance of the :class:`FileHandler` class. The specified file is
opened and used as the stream for logging. If *mode* is not specified,
Outputs the record to the file.
+.. _null-handler:
NullHandler
^^^^^^^^^^^
See :ref:`library-config` for more information on how to use
:class:`NullHandler`.
+.. _watched-file-handler:
+
WatchedFileHandler
^^^^^^^^^^^^^^^^^^
changed. If it has, the existing stream is flushed and closed and the
file opened again, before outputting the record to the file.
+.. _rotating-file-handler:
RotatingFileHandler
^^^^^^^^^^^^^^^^^^^
Outputs the record to the file, catering for rollover as described
previously.
+.. _timed-rotating-file-handler:
TimedRotatingFileHandler
^^^^^^^^^^^^^^^^^^^^^^^^
timed intervals.
-.. class:: TimedRotatingFileHandler(filename, when='h', interval=1, backupCount=0, encoding=None, delay=0, utc=False)
+.. class:: TimedRotatingFileHandler(filename, when='h', interval=1, backupCount=0, encoding=None, delay=False, utc=False)
Returns a new instance of the :class:`TimedRotatingFileHandler` class. The
specified file is opened and used as the stream for logging. On rotating it also
one is deleted. The deletion logic uses the interval to determine which
files to delete, so changing the interval may leave old files lying around.
+ If *delay* is true, then file opening is deferred until the first call to
+ :meth:`emit`.
+
.. method:: doRollover()
Outputs the record to the file, catering for rollover as described above.
+.. _socket-handler:
+
SocketHandler
^^^^^^^^^^^^^
Pickles the record's attribute dictionary in binary format with a length
prefix, and returns it ready for transmission across the socket.
+ Note that pickles aren't completely secure. If you are concerned about
+ security, you may want to override this method to implement a more secure
+ mechanism. For example, you can sign pickles using HMAC and then verify
+ them on the receiving end, or alternatively you can disable unpickling of
+ global objects on the receiving end.
.. method:: send(packet)
partial sends which can happen when the network is busy.
+.. _datagram-handler:
+
DatagramHandler
^^^^^^^^^^^^^^^
Send a pickled string to a socket.
+.. _syslog-handler:
+
SysLogHandler
^^^^^^^^^^^^^
lookup to get the message ID. This version returns 1, which is the base
message ID in :file:`win32service.pyd`.
+.. _smtp-handler:
SMTPHandler
^^^^^^^^^^^
If you want to specify a subject line which is record-dependent, override
this method.
+.. _memory-handler:
MemoryHandler
^^^^^^^^^^^^^
Checks for buffer full or a record at the *flushLevel* or higher.
+.. _http-handler:
+
HTTPHandler
^^^^^^^^^^^
just uses :func:`traceback.print_exception`. The resulting string is
returned.
+.. _filter:
Filter Objects
--------------
yes. If deemed appropriate, the record may be modified in-place by this
method.
+.. _log-record:
LogRecord Objects
-----------------
Returns the message for this :class:`LogRecord` instance after merging any
user-supplied arguments with the message.
+.. _logger-adapter:
LoggerAdapter Objects
---------------------