diff --git a/.run/build.run.xml b/.run/build.run.xml new file mode 100644 index 0000000..70ef054 --- /dev/null +++ b/.run/build.run.xml @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git a/.run/twine check.run.xml b/.run/twine check.run.xml new file mode 100644 index 0000000..6c5f631 --- /dev/null +++ b/.run/twine check.run.xml @@ -0,0 +1,17 @@ + + + + \ No newline at end of file diff --git a/.run/twine upload testpypi.run.xml b/.run/twine upload testpypi.run.xml new file mode 100644 index 0000000..99cb343 --- /dev/null +++ b/.run/twine upload testpypi.run.xml @@ -0,0 +1,17 @@ + + + + \ No newline at end of file diff --git a/.run/twine upload.run.xml b/.run/twine upload.run.xml new file mode 100644 index 0000000..cb4bdd6 --- /dev/null +++ b/.run/twine upload.run.xml @@ -0,0 +1,17 @@ + + + + \ No newline at end of file diff --git a/dist/eh-logger-0.1.0.tar.gz b/dist/eh-logger-0.1.0.tar.gz new file mode 100644 index 0000000..fe9a6ef Binary files /dev/null and b/dist/eh-logger-0.1.0.tar.gz differ diff --git a/dist/eh_logger-0.1.0-py3-none-any.whl b/dist/eh_logger-0.1.0-py3-none-any.whl new file mode 100644 index 0000000..00e1ac2 Binary files /dev/null and b/dist/eh_logger-0.1.0-py3-none-any.whl differ diff --git a/eh_logging/eh_logger.egg-info/PKG-INFO b/eh_logging/eh_logger.egg-info/PKG-INFO new file mode 100644 index 0000000..4d348cf --- /dev/null +++ b/eh_logging/eh_logger.egg-info/PKG-INFO @@ -0,0 +1,107 @@ +Metadata-Version: 2.1 +Name: eh-logger +Version: 0.1.0 +Summary: Simple helper to get easier formatted logger from the python logging module +Home-page: https://git.eishausener.dev/Eishausener/eh-logger +Author: Eishausener +Author-email: code@eishausener.de +License: MIT +Project-URL: issue tracker, https://git.eishausener.dev/Eishausener/eh-logger/issues +Classifier: License :: OSI Approved :: MIT License +Description-Content-Type: text/markdown +Provides-Extra: dev +Requires-Dist: twine; extra == "dev" +Requires-Dist: wheel; extra == "dev" +Requires-Dist: setuptools; extra == "dev" + + +# eh-logger + +> Simple helper to get easier formatted logger from the python logging module + +# install + +pip install git+https://git.eishausener.dev/Eishausener/eh-logger \ +or \ +pip install git+https://github.com/Eishausener/eh-logger + +# usage + +import eh-logging, create a formatted logger and use the logger + +```python +# import +import eh_logging as logging + +# create formatted logger +formatted_logger = logging.get_formatted_logger( + 'formatted_logger', + console=True, + console_level=logging.DEBUG, + file=True, + file_path=r'log\formatted_logger.log', + file_level=logging.DEBUG, + file_backup_count=5, + file_rotate='h', +) + +# use the logger +formatted_logger.debug('Example formatted DEBUG Message') +formatted_logger.info('Example formatted INFO Message') +formatted_logger.warning('Example formatted WARNING Message') +formatted_logger.error('Example formatted ERROR Message') +formatted_logger.critical('Example formatted CRITICAL Message') + +``` + +use the decorator with the INFO level + +```python +# import +import eh_logging as logging + +# set default logger to DEBUG level to see output +logging.set_default_level(logging.DEBUG) + + +# use logging decorator with default logger +@logging.Decorator.info(arg=True, kwarg=True, return_value=True, decimal_places=1) +def example_function(first_param, second_param, *args, **kwargs): + return first_param, second_param, *args, *kwargs + + +# execute function +example_function('Hello', 'world', 'test', 'example', hello='world', world='test') + +``` + +use the decorator with own logger + +```python +# import +import eh_logging as logging + + +# create formatted logger +formatted_logger = logging.get_formatted_logger( + 'example_decorator_logger', + console=True, + console_level=logging.DEBUG, + file=True, + file_path=r'log\decorator_logger.log', + file_level=logging.DEBUG, + file_backup_count=5, + file_rotate='h', +) + + +# use logging decorator with custom logger +@logging.Decorator.debug(logger=formatted_logger, arg=True, kwarg=True, return_value=True, decimal_places=1) +def example_function(first_param, second_param, *args, **kwargs): + return first_param, second_param, *args, *kwargs + + +# execute function +example_function('Hello', 'world', 'test', 'example', hello='world', world='test') + +``` diff --git a/eh_logging/eh_logger.egg-info/SOURCES.txt b/eh_logging/eh_logger.egg-info/SOURCES.txt new file mode 100644 index 0000000..c109475 --- /dev/null +++ b/eh_logging/eh_logger.egg-info/SOURCES.txt @@ -0,0 +1,8 @@ +README.md +setup.py +eh_logging/eh_logger.egg-info/PKG-INFO +eh_logging/eh_logger.egg-info/SOURCES.txt +eh_logging/eh_logger.egg-info/dependency_links.txt +eh_logging/eh_logger.egg-info/requires.txt +eh_logging/eh_logger.egg-info/top_level.txt +test/test.py \ No newline at end of file diff --git a/eh_logging/eh_logger.egg-info/dependency_links.txt b/eh_logging/eh_logger.egg-info/dependency_links.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/eh_logging/eh_logger.egg-info/dependency_links.txt @@ -0,0 +1 @@ + diff --git a/eh_logging/eh_logger.egg-info/requires.txt b/eh_logging/eh_logger.egg-info/requires.txt new file mode 100644 index 0000000..0556cc8 --- /dev/null +++ b/eh_logging/eh_logger.egg-info/requires.txt @@ -0,0 +1,5 @@ + +[dev] +twine +wheel +setuptools diff --git a/eh_logging/eh_logger.egg-info/top_level.txt b/eh_logging/eh_logger.egg-info/top_level.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/eh_logging/eh_logger.egg-info/top_level.txt @@ -0,0 +1 @@ + diff --git a/setup.py b/setup.py index 72d7875..00ce6cb 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ name = eh_logging.__name__ setup( name=name, version=version, - description='', + description='Simple helper to get easier formatted logger from the python logging module', package_dir={'': 'eh_logging'}, packages=find_packages(where='eh_logging'), long_description=long_description, @@ -20,6 +20,7 @@ setup( author=author, author_email='code@eishausener.de', license='MIT', + # https://pypi.org/classifiers/ classifiers=[ 'License :: OSI Approved :: MIT License', ],