From a1dd396fd433a0e679e38ab7a2444ed09e0fed3a Mon Sep 17 00:00:00 2001 From: dtomlinson Date: Mon, 13 Jan 2020 23:08:15 +0000 Subject: [PATCH] updating documentation --- docs/source/modules/panaetius.rst | 18 ++++++++++++++++-- tests/test.py | 2 ++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/docs/source/modules/panaetius.rst b/docs/source/modules/panaetius.rst index bd1a1f9..2506923 100644 --- a/docs/source/modules/panaetius.rst +++ b/docs/source/modules/panaetius.rst @@ -17,7 +17,7 @@ The following is availble by importing the module: panaetius.CONFIG ---------------- -``panaetius.CONFIG`` provides an instance of :class:`panaetius.config.Config` +:obj:`panaetius.CONFIG` provides an instance of :class:`panaetius.config.Config` panaetius.set_config() @@ -45,8 +45,22 @@ Conveniently provides access to all attributes that have been declared with :fun panaetius.logger ----------------- -``panaetius.logger`` provides a logger instance already formatted with a nice json output. +:obj:`panaetius.logger` provides a logger instance already formatted with a nice json output. .. code-block:: python panaetius.logger.info('some logging message') + +This gives a logger output of: + +.. code-block:: json + + { + "time": "2020-01-13 23:07:17,913", + "file_name": "test.py", + "module": "test", + "function":"", + "line_number": "33", + "logging_level":"INFO", + "message": "some logging message" + } diff --git a/tests/test.py b/tests/test.py index 632d743..6b602a1 100644 --- a/tests/test.py +++ b/tests/test.py @@ -29,3 +29,5 @@ print(panaetius.CONFIG.config_file) # for i in panaetius.CONFIG.deferred_messages: # panaetius.logger.debug(i) + +panaetius.logger.info('some logging message')