-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix my refs and segment out the Logger API docs a bit. need a better …
…intro for them.
- Loading branch information
Showing
4 changed files
with
65 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,48 @@ | ||
The Logger | ||
============== | ||
========== | ||
|
||
.. automodule:: lithoxyl.logger | ||
|
||
.. autoclass:: lithoxyl.logger.Logger | ||
:members: | ||
|
||
Record creation | ||
~~~~~~~~~~~~~~~ | ||
|
||
The Logger is primarily used through its | ||
:class:`~lithoxyl.record.Record`-creating convenience methods named | ||
after various log levels: :meth:`~Logger.debug`, :meth:`~Logger.info`, | ||
and :meth:`~Logger.critical`. | ||
|
||
Each creates a new :term:`record` with a given name, passing any | ||
additional keyword arguments on through to the | ||
:class:`lithoxyl.record.Record` constructor. | ||
|
||
.. automethod:: lithoxyl.logger.Logger.debug | ||
.. automethod:: lithoxyl.logger.Logger.info | ||
.. automethod:: lithoxyl.logger.Logger.critical | ||
|
||
The record level can also be passed in: | ||
|
||
.. automethod:: lithoxyl.logger.Logger.record | ||
|
||
Sink registration | ||
~~~~~~~~~~~~~~~~~ | ||
|
||
Another vital aspect of Loggers is the :ref:`registration and | ||
management of Sinks <configuring_sinks>`. | ||
|
||
.. autoattribute:: lithoxyl.logger.Logger.sinks | ||
.. automethod:: lithoxyl.logger.Logger.add_sink | ||
.. automethod:: lithoxyl.logger.Logger.set_sinks | ||
.. automethod:: lithoxyl.logger.Logger.clear_sinks | ||
|
||
Event handling | ||
~~~~~~~~~~~~~~ | ||
|
||
The event handling portion of the Logger API exists for Logger-Sink | ||
interactions. | ||
|
||
.. automethod:: lithoxyl.logger.Logger.on_begin | ||
.. automethod:: lithoxyl.logger.Logger.on_end | ||
.. automethod:: lithoxyl.logger.Logger.on_warn | ||
.. automethod:: lithoxyl.logger.Logger.on_exception |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters