custom-python-logger 0.1.0__tar.gz → 0.1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (17) hide show
  1. {custom_python_logger-0.1.0/custom_python_logger.egg-info → custom_python_logger-0.1.1}/PKG-INFO +30 -2
  2. custom_python_logger-0.1.1/README.md +38 -0
  3. {custom_python_logger-0.1.0 → custom_python_logger-0.1.1/custom_python_logger.egg-info}/PKG-INFO +30 -2
  4. {custom_python_logger-0.1.0 → custom_python_logger-0.1.1}/setup.py +4 -1
  5. custom_python_logger-0.1.0/README.md +0 -12
  6. {custom_python_logger-0.1.0 → custom_python_logger-0.1.1}/LICENSE +0 -0
  7. {custom_python_logger-0.1.0 → custom_python_logger-0.1.1}/MANIFEST.in +0 -0
  8. {custom_python_logger-0.1.0 → custom_python_logger-0.1.1}/custom_python_logger/__init__.py +0 -0
  9. {custom_python_logger-0.1.0 → custom_python_logger-0.1.1}/custom_python_logger/logger.py +0 -0
  10. {custom_python_logger-0.1.0 → custom_python_logger-0.1.1}/custom_python_logger/usage_example.py +0 -0
  11. {custom_python_logger-0.1.0 → custom_python_logger-0.1.1}/custom_python_logger.egg-info/SOURCES.txt +0 -0
  12. {custom_python_logger-0.1.0 → custom_python_logger-0.1.1}/custom_python_logger.egg-info/dependency_links.txt +0 -0
  13. {custom_python_logger-0.1.0 → custom_python_logger-0.1.1}/custom_python_logger.egg-info/requires.txt +0 -0
  14. {custom_python_logger-0.1.0 → custom_python_logger-0.1.1}/custom_python_logger.egg-info/top_level.txt +0 -0
  15. {custom_python_logger-0.1.0 → custom_python_logger-0.1.1}/pyproject.toml +0 -0
  16. {custom_python_logger-0.1.0 → custom_python_logger-0.1.1}/setup.cfg +0 -0
  17. {custom_python_logger-0.1.0 → custom_python_logger-0.1.1}/tests/test_logger.py +0 -0
@@ -1,10 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: custom-python-logger
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: A custom logger with color support and additional features.
5
5
  Home-page: https://github.com/aviz92/custom-python-logger
6
6
  Author: Avi Zaguri
7
7
  Author-email:
8
+ Project-URL: Repository, https://github.com/aviz92/custom-python-logger
8
9
  Classifier: Programming Language :: Python :: 3
9
10
  Classifier: Programming Language :: Python :: 3.7
10
11
  Classifier: License :: OSI Approved :: MIT License
@@ -24,6 +25,7 @@ Dynamic: description
24
25
  Dynamic: description-content-type
25
26
  Dynamic: home-page
26
27
  Dynamic: license-file
28
+ Dynamic: project-url
27
29
  Dynamic: requires-dist
28
30
  Dynamic: requires-python
29
31
  Dynamic: summary
@@ -39,4 +41,30 @@ pip install custom-python-logger
39
41
  ```
40
42
 
41
43
  ## Usage
42
- please see the [usage_example](custom_python_logger/usage_example.py) file for more details.
44
+ ```python
45
+ import logging
46
+ from custom_python_logger.logger import get_logger
47
+
48
+ def main():
49
+ logger = get_logger(
50
+ project_name='Logger Project Test',
51
+ log_level=logging.DEBUG,
52
+ extra={'user': 'test_user'}
53
+ )
54
+
55
+ logger.debug("This is a debug message.")
56
+ logger.info("This is an info message.")
57
+ logger.step("This is a step message.")
58
+ logger.warning("This is a warning message.")
59
+
60
+ try:
61
+ _ = 1 / 0
62
+ except ZeroDivisionError:
63
+ logger.exception("This is an exception message.")
64
+
65
+ logger.critical("This is a critical message.")
66
+
67
+
68
+ if __name__ == '__main__':
69
+ main()
70
+ ```
@@ -0,0 +1,38 @@
1
+ # Custom Logger
2
+ A Python logger with colored output and additional log levels. <br>
3
+ The logger supports custom log levels like `STEP` and `EXCEPTION` and can be easily integrated into your Python projects.
4
+
5
+ ## Installation
6
+ You can install the package using pip:
7
+ ```bash
8
+ pip install custom-python-logger
9
+ ```
10
+
11
+ ## Usage
12
+ ```python
13
+ import logging
14
+ from custom_python_logger.logger import get_logger
15
+
16
+ def main():
17
+ logger = get_logger(
18
+ project_name='Logger Project Test',
19
+ log_level=logging.DEBUG,
20
+ extra={'user': 'test_user'}
21
+ )
22
+
23
+ logger.debug("This is a debug message.")
24
+ logger.info("This is an info message.")
25
+ logger.step("This is a step message.")
26
+ logger.warning("This is a warning message.")
27
+
28
+ try:
29
+ _ = 1 / 0
30
+ except ZeroDivisionError:
31
+ logger.exception("This is an exception message.")
32
+
33
+ logger.critical("This is a critical message.")
34
+
35
+
36
+ if __name__ == '__main__':
37
+ main()
38
+ ```
@@ -1,10 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: custom-python-logger
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: A custom logger with color support and additional features.
5
5
  Home-page: https://github.com/aviz92/custom-python-logger
6
6
  Author: Avi Zaguri
7
7
  Author-email:
8
+ Project-URL: Repository, https://github.com/aviz92/custom-python-logger
8
9
  Classifier: Programming Language :: Python :: 3
9
10
  Classifier: Programming Language :: Python :: 3.7
10
11
  Classifier: License :: OSI Approved :: MIT License
@@ -24,6 +25,7 @@ Dynamic: description
24
25
  Dynamic: description-content-type
25
26
  Dynamic: home-page
26
27
  Dynamic: license-file
28
+ Dynamic: project-url
27
29
  Dynamic: requires-dist
28
30
  Dynamic: requires-python
29
31
  Dynamic: summary
@@ -39,4 +41,30 @@ pip install custom-python-logger
39
41
  ```
40
42
 
41
43
  ## Usage
42
- please see the [usage_example](custom_python_logger/usage_example.py) file for more details.
44
+ ```python
45
+ import logging
46
+ from custom_python_logger.logger import get_logger
47
+
48
+ def main():
49
+ logger = get_logger(
50
+ project_name='Logger Project Test',
51
+ log_level=logging.DEBUG,
52
+ extra={'user': 'test_user'}
53
+ )
54
+
55
+ logger.debug("This is a debug message.")
56
+ logger.info("This is an info message.")
57
+ logger.step("This is a step message.")
58
+ logger.warning("This is a warning message.")
59
+
60
+ try:
61
+ _ = 1 / 0
62
+ except ZeroDivisionError:
63
+ logger.exception("This is an exception message.")
64
+
65
+ logger.critical("This is a critical message.")
66
+
67
+
68
+ if __name__ == '__main__':
69
+ main()
70
+ ```
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='custom-python-logger',
5
- version='0.1.0',
5
+ version='0.1.1',
6
6
  packages=find_packages(include=['custom_python_logger', 'custom_python_logger.*']),
7
7
  install_requires=[
8
8
  'colorlog>=4.0.0',
@@ -18,6 +18,9 @@ setup(
18
18
  long_description=open('README.md').read(),
19
19
  long_description_content_type='text/markdown',
20
20
  url='https://github.com/aviz92/custom-python-logger',
21
+ project_urls={
22
+ 'Repository': 'https://github.com/aviz92/custom-python-logger',
23
+ },
21
24
  classifiers=[
22
25
  'Programming Language :: Python :: 3',
23
26
  'Programming Language :: Python :: 3.7',
@@ -1,12 +0,0 @@
1
- # Custom Logger
2
- A Python logger with colored output and additional log levels. <br>
3
- The logger supports custom log levels like `STEP` and `EXCEPTION` and can be easily integrated into your Python projects.
4
-
5
- ## Installation
6
- You can install the package using pip:
7
- ```bash
8
- pip install custom-python-logger
9
- ```
10
-
11
- ## Usage
12
- please see the [usage_example](custom_python_logger/usage_example.py) file for more details.