Skip to content

Commit

Permalink
Providing link to sample for supported logging configuration files.
Browse files Browse the repository at this point in the history
Code style fixes.
  • Loading branch information
Afxentios Hadjiminas committed Feb 1, 2017
1 parent 0356e88 commit 5c0379b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.rst
Expand Up @@ -111,6 +111,8 @@ Configured from dictionary

2017-01-31 13:12:56,002 - my_logger - WARNING - This will be written in a file called warning.log

*Note: You can find sample of logging configuration files supported by config-logger in* `this repo`_.


License
-------
Expand All @@ -121,3 +123,4 @@ This project is licensed under the MIT license.
.. _Issue tracker: https://github.com/afxentios/config-logger/issues
.. _latest release: https://github.com/afxentios/config-logger/releases
.. _Configuration dictionary schema: https://docs.python.org/3/library/logging.config.html#logging-config-dictschema
.. _this repo: https://github.com/afxentios/python_logging_configuration_sample
1 change: 1 addition & 0 deletions config_logger/logger.py
Expand Up @@ -25,6 +25,7 @@ def __init__(
name - Name of the Logger instance.
cfg_path - Path of the logging configuration file.
default_level - Default logging level.
default_conf - Dictionary with the default values for the config files.
env_key - Environment variable which can be set to load the logging configuration from specific path.
"""
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -18,7 +18,7 @@ def readme():
author_email='afxentios@hadjimina.com',
keywords=["logging", "configurable", "configuration"],
packages=find_packages(),
install_requires=['logging', 'PyYAML', 'config-manager'],
install_requires=['logging', 'PyYAML', 'config-manager', 'testfixtures'],
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
Expand Down
9 changes: 8 additions & 1 deletion tests/logger_test.py
Expand Up @@ -94,7 +94,14 @@ class LoggerTest(unittest.TestCase):
}
}

config2 = {'version': 1, 'disable_existing_loggers': False, 'root': {'level': 'WARNING'}}
config2 = {
'version': 1,
'disable_existing_loggers': False,
'root':
{
'level': 'WARNING'
}
}

@patch.object(ConfigManager, 'load_config')
def test_logger_constructor(self, mocked_config):
Expand Down

0 comments on commit 5c0379b

Please sign in to comment.