Skip to content

Commit

Permalink
format field table WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
mahmoud committed Apr 17, 2015
1 parent 1ba357a commit ea3092e
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/formatting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,16 @@ Formatting Capabilities

.. automodule:: lithoxyl.formatters

`Formatter` types
-----------------

.. autoclass:: lithoxyl.formatters.Formatter
:members:

Format fields
-------------

.. TODO: clarify whether these are just for Formatter or how other
types can take advantage
.. automodule:: lithoxyl.fields
62 changes: 62 additions & 0 deletions lithoxyl/fields.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,66 @@
# -*- coding: utf-8 -*-
"""Lithoxyl comes with many built-in format *fields* meant to be used
with the standard :class:`~lithoxyl.logger.Logger` and
:class:`~lithoxyl.record.Record`. Sinks can take advantage of these
with the :class:`~lithoxyl.formatters.Formatter` type or subtypes.
+-----------------+-----------------------------+-------+
| Name | Description | Quoted|
+=================+=============================+=======+
| logger_name | | Y |
+-------------------------------------------------------+
| logger_id | | |
+-------------------------------------------------------+
| record_name | | Y |
+-------------------------------------------------------+
| record_id | | |
+-------------------------------------------------------+
| status_str | | |
+-------------------------------------------------------+
| status_char | | |
+-------------------------------------------------------+
| warn_char | | |
+-------------------------------------------------------+
| level_name | | |
+-------------------------------------------------------+
| extras | | |
+-------------------------------------------------------+
|level_name_upper | | |
+-------------------------------------------------------+
| level_number | | |
+-------------------------------------------------------+
| message | | Y |
+-------------------------------------------------------+
| raw_message | | Y |
+-------------------------------------------------------+
|begin_timestamp | | |
+-------------------------------------------------------+
| end_timestamp | | |
+-------------------------------------------------------+
| duration_secs | | |
+-------------------------------------------------------+
| duration_msecs | | |
+-------------------------------------------------------+
| module_name | | Y |
+-------------------------------------------------------+
| module_path | | Y |
+-------------------------------------------------------+
| func_name | | |
+-------------------------------------------------------+
| line_number | | |
+-------------------------------------------------------+
| exc_type | | |
+-------------------------------------------------------+
| exc_message | | Y |
+-------------------------------------------------------+
| exc_tb_str | | Y |
+-------------------------------------------------------+
| exc_tb_list | | Y |
+-------------------------------------------------------+
| process_id | | |
+-----------------+-----------------------------+-------+
"""


import time
import json
Expand Down

0 comments on commit ea3092e

Please sign in to comment.