Changelog
1.3 (2023-01-24)
No longer try to be smart about interactive mode or not. You can set the active logging-handlers by setting the env-var
LOG_HANDLERS`Remove
disable_consoleas input-parameter tolibranet_logging.initialize().Change default separator from
;to|. Use set via env-varLOG_HANDLERS.
1.2 (2021-06-06)
Fix logo. [WVH]
Add .gitlab-ci.yml [WVH]
1.1 (2020-02-13)
Fix error
ModuleNotFoundError: No module named 'libranet_logging.version'. [WVH]
1.0 (2020-02-12)
Move
__version__-attribute to__init__. [WVH]Package
libranet_loggingforked from WVH’s unreleased package. [WVH]
0.5 (2019-08-19)
Add docstrings and type-hinting.
Fix a series of issues reported by pylint.
Change function-signature of
libranet_logging.yaml.read_yml: changevarsintovariablesto avoid shadowing the buitlinvars()-function:>>> config = read_yaml(path, vars=None) >>> config = read_yaml(path, variables=None)
0.4 (2019-07-31)
Add
version.pywith a__version__-attribute, rework version-management.In
setup.pyset minimum-requirements for cerberus >=1.3.1. [WVH]
0.3 (2019-05-28)
In sphinx-docs, add link to coverage-report on https://example.com/docs/libranet_logging-coverage [WVH]
In
Makefileadd step`` copy-cov`` to copy coverage-report to apache-webdirectory. [WVH]In
libranet_logging.yaml.read_yamlcdefault vars to empty dicts when not provided. [WVH]In
libranet_logging.logconfig.logging_schemarenamevalueschematovaluesrulesto avoid DeprecationWarnings. [WVH]
0.2 (2019-03-28)
Make
libranet_logging.yaml.read_yamlcompatible with PyYAML 5.1, but keep backwards-compatibility with older versions. [WVH] Cfr:- https://github.com/yaml/pyyaml/blob/master/CHANGES - https://github.com/yaml/pyyaml/pull/257 - https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation
0.1 (2019-03-28)
Add support for simple string-formatting in the loggin.yml. [WVH]
Use
isortto manage the imports. Add isort-config tosetup.cfg. [WVH]Introduce environment-variable
PYTHON_CONSOLE_FORMATTERto select which console-formatter to use. [WVH]Rename
colored-console-formatter intoconsole_colorand addconsole_bw-formatter for simpe black & white logging in the console. [WVH]Add
flask_wtf-handler in defaultlogging.yml. [WVH]If the log-directory does not yet exist, we now create it. [WVH]
We should have a user-specific default location to avoid interference between users. The log-directory will be first taken from th direct function-parameters, then from the
logging.ymlif present. If not present, from the env-varPYTHON_LOG_CONFIG, and in case of no env-var we default to$HOME/logsinstead ofvar/tmp/python. [WVH]Support setting the log-directory via the
initialize-function. [WVH]Fix failing test
test_initialize_without_logging_tree. It was failing when the env-varPYTHON_ENABLE_LOGGING_TREEwas not set. [WVH]Fix failing test of the click-command
cli.print_logging_tree. [WVH]Add new testing-dependency
pytest-click. [WVH]Convert
cli.print_logging_treeto aclick-command, accepting an optionalpath-argument. If the environment-variablePYTHON_LOG_CONFIGis set, we use that value as the path-default. [WVH]Add
clickas a new dependency. [WVH]Add documentation about unittesting. [WVH]
We now support arrays in environment-variables. Environment-variables containing a
;are now converted to a list similar to the default value if that env-variable was not set. [WVH]Fix
filters.RegexFilterto usesearch()instead ofmatch(). Cfr. https://docs.python.org/3/library/re.html#search-vs-match [WVH]Add passing unit-tests. [WVH]
In
initialize()allow Path-parameters as input instead of only string-paths. [WVH]Generally make the code robust in case of loading a logging.yml with schema-errors. [WVH]
Add console-entrypoint
libranet-logging-print-logging-treeto initialize the logging and print the logging-tree to the standard output. Add corresponding function in newlibranet_logging.cli-module. [WVH]Add function-paramater
use_print=Falsetologconfig.show_logging_treeto enable printing to standard output instead of logging to the configured loggers. [WVH]If we call
initialize()without providing a path of setting the environmant-variablePYTHON_LOG_CONFIG, we now use the defaultlogging.ymlshipped with thislibranet_logging-package. [WVH]Add logger
libranet_loggingto our defaultlogging.yml. [WVH]Instantiate the correct logger using
__name__instead of logging to the root-logger. [WVH]Add
recommonmarkand updatedocs.conf.pyto allow markdown in docs. Cfr.https://recommonmark.readthedocs.io/en/latest/ [WVH]In
setup.pyanddocs/pip-requirementsaddsphinx-related dependencies. [WVH]Simplify public api:
Rename function
loglevel.create_loglevelintologlevel.create.Rename function
logconfig.initialize_loggingintologconfig.initialize.
[WVH]
Run
Blackon the code.Blackis a code-formatter for Python. Cfr. https://github.com/ambv/black [WVH]Add some basic Sphinx-based documentation. [WVH]
Factor out creating new loglevels into its own
loglevel-module. [WVH]Factor out logging-filters into its own
filters-module. [WVH]Add third-party dependency
colorlog. This is not a code-dependency but rather a dependency oflogging.yml. [WVH]Add third-party dependencies
cerberus,logging_treeandPyYAML. [WVH]Move logging-related code from
libdl.utilsinto its ownlibranet_logging-package. [WVH]Package created via
cookiecutter templates/cookiecutter-libranet-python-package. [Wouter Vanden Hove <wouter@wvhconsulting.org>]