diff --git a/docs/conf.py b/docs/conf.py index 6473847..d203694 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -54,6 +54,16 @@ # The master toctree document. master_doc = 'index' +autodoc_default_options = { + 'members': True, +} +autodoc_default_flags = [ + 'show-inheritance' +] +autodoc_typehints = "description" +autoclass_content = 'both' + + # General information about the project. project = u'SeqLog' copyright = u"2016, Adam Friedman" diff --git a/docs/index.rst b/docs/index.rst index 08a06b9..ca420ae 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -17,6 +17,7 @@ Contents: readme installation + migration usage usage-gunicorn Modules diff --git a/docs/migration.rst b/docs/migration.rst new file mode 100644 index 0000000..a0af02e --- /dev/null +++ b/docs/migration.rst @@ -0,0 +1,22 @@ +=============================== +Migration guide from 0.4 to 0.5 +=============================== + +First of all, the official way to configure Seq is via + +.. autofunction:: seqlog.configure_from_dict + +Alternatively you can call + +.. autofunction:: seqlog.configure_from_file + + +.. warning:: DO NOT call :code:`logging.config.fromDict` + +Then, FeatureFlags were completely obliterated and moved to SeqLogHandler's constructor. + +Then, the SeqLogHandler accepts way more arguments that you can define in this dict: + +.. autoclass:: seqlog.structured_logging.SeqLogHandler + :members: + diff --git a/docs/usage.rst b/docs/usage.rst index b709a42..c1c73ba 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -58,6 +58,8 @@ First, create your configuration file (e.g. ``/foo/bar/my_config.yml``): # Configure logging from scratch. disable_existing_loggers: True + override_root_logger: True + use_structured_logger: True # Configure the root logger to use Seq root: @@ -98,7 +100,7 @@ First, create your configuration file (e.g. ``/foo/bar/my_config.yml``): seq: style: '{' -Then, call ``seqlog.configure_from_file()``: +Then, call :func:`seqlog.configure_from_file`: .. code-block:: python @@ -115,11 +117,9 @@ Then, call ``seqlog.configure_from_file()``: Configuring logging from a dictionary ------------------------------------- -.. deprecated:: 0.5.0 - Use logging.config.dictConfig() directly - Seqlog can also use a dictionary to describe the desired logging configuration. This dictionary has the schema specified in Python's `logging.config `_ module. +With some extra options described in :func:`seqlog.configure_from_dict`. .. code-block:: python @@ -137,29 +137,6 @@ This dictionary has the schema specified in Python's `logging.config