Skip to content

Commit

Permalink
Properly configure logging for the Pottery library (#591)
Browse files Browse the repository at this point in the history
  • Loading branch information
brainix authored Jan 12, 2022
1 parent 7594f31 commit 6c3b17b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pottery/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@


__title__: Final[str] = 'pottery'
__version__: Final[str] = '2.3.5'
__version__: Final[str] = '2.3.6'
__description__: Final[str] = __doc__.split(sep='\n\n', maxsplit=1)[0]
__url__: Final[str] = 'https://github.com/brainix/pottery'
__author__: Final[str] = 'Rajiv Bakulesh Shah'
Expand Down
2 changes: 2 additions & 0 deletions pottery/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@


logger: Final[logging.Logger] = logging.getLogger('pottery')
logger.addHandler(logging.NullHandler())

_default_url: Final[str] = os.environ.get('REDIS_URL', 'redis://localhost:6379/0')
_default_redis: Final[Redis] = Redis.from_url(_default_url, socket_timeout=1)

Expand Down
1 change: 1 addition & 0 deletions pottery/monkey.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@


_logger: Final[logging.Logger] = logging.getLogger('pottery')
_logger.addHandler(logging.NullHandler())


# Monkey patch the JSON encoder to be able to JSONify any instance of any class
Expand Down

0 comments on commit 6c3b17b

Please sign in to comment.