VersaLog 2.5.5__tar.gz → 2.6.0__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.
- {versalog-2.5.5 → versalog-2.6.0}/PKG-INFO +65 -11
- {versalog-2.5.5 → versalog-2.6.0}/README.md +63 -10
- versalog-2.6.0/VersaLog/__init__.py +13 -0
- versalog-2.6.0/VersaLog/integrations/auto.py +32 -0
- versalog-2.6.0/VersaLog/integrations/django.py +5 -0
- versalog-2.6.0/VersaLog/integrations/flask.py +8 -0
- versalog-2.6.0/VersaLog/integrations/generic.py +14 -0
- {versalog-2.5.5 → versalog-2.6.0}/VersaLog.egg-info/PKG-INFO +65 -11
- {versalog-2.5.5 → versalog-2.6.0}/VersaLog.egg-info/SOURCES.txt +6 -1
- versalog-2.6.0/VersaLog.egg-info/requires.txt +1 -0
- {versalog-2.5.5 → versalog-2.6.0}/setup.py +4 -2
- versalog-2.5.5/VersaLog/__init__.py +0 -10
- {versalog-2.5.5 → versalog-2.6.0}/LICENSE +0 -0
- {versalog-2.5.5 → versalog-2.6.0}/VersaLog/core.py +0 -0
- {versalog-2.5.5 → versalog-2.6.0}/VersaLog/handler.py +0 -0
- {versalog-2.5.5 → versalog-2.6.0}/VersaLog/integrations/__init__.py +0 -0
- {versalog-2.5.5 → versalog-2.6.0}/VersaLog/integrations/fastapi.py +0 -0
- {versalog-2.5.5 → versalog-2.6.0}/VersaLog.egg-info/dependency_links.txt +0 -0
- {versalog-2.5.5 → versalog-2.6.0}/VersaLog.egg-info/top_level.txt +0 -0
- {versalog-2.5.5 → versalog-2.6.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: VersaLog
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.6.0
|
|
4
4
|
Summary: Versatile logging library.
|
|
5
5
|
Home-page:
|
|
6
6
|
Author:
|
|
@@ -17,6 +17,7 @@ Classifier: Operating System :: OS Independent
|
|
|
17
17
|
Requires-Python: >=3.8, <3.14
|
|
18
18
|
Description-Content-Type: text/markdown
|
|
19
19
|
License-File: LICENSE
|
|
20
|
+
Requires-Dist: plyer
|
|
20
21
|
|
|
21
22
|
## What is VersaLog.py?
|
|
22
23
|
|
|
@@ -27,8 +28,69 @@ License-File: LICENSE
|
|
|
27
28
|
[](https://discord.gg/Ms2ejEES)
|
|
28
29
|
|
|
29
30
|
What is VersaLog.py?
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
|
|
32
|
+
VersaLog is a modern, powerful, and flexible logging library for Python.
|
|
33
|
+
It supports everything from simple usage to advanced, highly customizable configurations, making it suitable for a wide range of use cases.
|
|
34
|
+
|
|
35
|
+
## Feature
|
|
36
|
+
|
|
37
|
+
### Basic Logging
|
|
38
|
+
|
|
39
|
+
- Supports standard log levels:
|
|
40
|
+
- `INFO`, `ERROR`, `WARNING`, `DEBUG`, `CRITICAL`
|
|
41
|
+
- Colored output for better readability
|
|
42
|
+
- Symbol-based prefixes (e.g. `[+]`, `[-]`, `[!]`)
|
|
43
|
+
|
|
44
|
+
### Multiple Output Formats
|
|
45
|
+
|
|
46
|
+
**Easily switch between different log styles:**
|
|
47
|
+
|
|
48
|
+
- `simple` → `[+] message`
|
|
49
|
+
- `simple2` → `[TIME] [+] message`
|
|
50
|
+
- `detailed` → `[TIME][LEVEL] : message`
|
|
51
|
+
- `file` → `[FILE:LINE][LEVEL] message`
|
|
52
|
+
|
|
53
|
+
### Tag System
|
|
54
|
+
|
|
55
|
+
- Add custom tags to logs
|
|
56
|
+
- Supports multiple tags (e.g. `["API", "AUTH"]`)
|
|
57
|
+
- Optional default tags
|
|
58
|
+
|
|
59
|
+
### File & Line Tracking
|
|
60
|
+
|
|
61
|
+
- Display caller file name and line number
|
|
62
|
+
- Useful for debugging large projects
|
|
63
|
+
|
|
64
|
+
### Log File Saving
|
|
65
|
+
|
|
66
|
+
- Automatically save logs to files
|
|
67
|
+
- Output path: `./log/YYYY-MM-DD.log`
|
|
68
|
+
- Select which log levels to save
|
|
69
|
+
|
|
70
|
+
### Auto Cleanup
|
|
71
|
+
|
|
72
|
+
- Automatically deletes old log files (default: 7 days)
|
|
73
|
+
- Keeps your log directory clean
|
|
74
|
+
|
|
75
|
+
### Auto Cleanup
|
|
76
|
+
|
|
77
|
+
- Disable console output
|
|
78
|
+
- Useful for background services
|
|
79
|
+
|
|
80
|
+
### Exception Handling
|
|
81
|
+
|
|
82
|
+
- Automatically captures unhandled exceptions
|
|
83
|
+
- Logs them as `CRITICAL`
|
|
84
|
+
|
|
85
|
+
### Desktop Notifications
|
|
86
|
+
|
|
87
|
+
- Optional desktop alerts for errors and critical logs
|
|
88
|
+
- Uses `plyer.notification`
|
|
89
|
+
|
|
90
|
+
### Asynchronous Logging
|
|
91
|
+
|
|
92
|
+
- Non-blocking log processing using threads and queues
|
|
93
|
+
- Improves performance in high-load environments
|
|
32
94
|
|
|
33
95
|
## Support
|
|
34
96
|
|
|
@@ -74,12 +136,4 @@ logger = VersaLog(enum="detailed", tag="a", show_tag=True)
|
|
|
74
136
|
|
|
75
137
|
# two tag
|
|
76
138
|
logger = VersaLog(enum="detailed", tag=["a", "a"], show_tag=True)
|
|
77
|
-
``` |
|
|
78
|
-
|
|
79
|
-
## Log save
|
|
80
|
-
|
|
81
|
-
````
|
|
82
|
-
|
|
83
|
-
[2025-08-06 04:10:36][INFO] : ok
|
|
84
|
-
|
|
85
139
|
```
|
|
@@ -7,8 +7,69 @@
|
|
|
7
7
|
[](https://discord.gg/Ms2ejEES)
|
|
8
8
|
|
|
9
9
|
What is VersaLog.py?
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
|
|
11
|
+
VersaLog is a modern, powerful, and flexible logging library for Python.
|
|
12
|
+
It supports everything from simple usage to advanced, highly customizable configurations, making it suitable for a wide range of use cases.
|
|
13
|
+
|
|
14
|
+
## Feature
|
|
15
|
+
|
|
16
|
+
### Basic Logging
|
|
17
|
+
|
|
18
|
+
- Supports standard log levels:
|
|
19
|
+
- `INFO`, `ERROR`, `WARNING`, `DEBUG`, `CRITICAL`
|
|
20
|
+
- Colored output for better readability
|
|
21
|
+
- Symbol-based prefixes (e.g. `[+]`, `[-]`, `[!]`)
|
|
22
|
+
|
|
23
|
+
### Multiple Output Formats
|
|
24
|
+
|
|
25
|
+
**Easily switch between different log styles:**
|
|
26
|
+
|
|
27
|
+
- `simple` → `[+] message`
|
|
28
|
+
- `simple2` → `[TIME] [+] message`
|
|
29
|
+
- `detailed` → `[TIME][LEVEL] : message`
|
|
30
|
+
- `file` → `[FILE:LINE][LEVEL] message`
|
|
31
|
+
|
|
32
|
+
### Tag System
|
|
33
|
+
|
|
34
|
+
- Add custom tags to logs
|
|
35
|
+
- Supports multiple tags (e.g. `["API", "AUTH"]`)
|
|
36
|
+
- Optional default tags
|
|
37
|
+
|
|
38
|
+
### File & Line Tracking
|
|
39
|
+
|
|
40
|
+
- Display caller file name and line number
|
|
41
|
+
- Useful for debugging large projects
|
|
42
|
+
|
|
43
|
+
### Log File Saving
|
|
44
|
+
|
|
45
|
+
- Automatically save logs to files
|
|
46
|
+
- Output path: `./log/YYYY-MM-DD.log`
|
|
47
|
+
- Select which log levels to save
|
|
48
|
+
|
|
49
|
+
### Auto Cleanup
|
|
50
|
+
|
|
51
|
+
- Automatically deletes old log files (default: 7 days)
|
|
52
|
+
- Keeps your log directory clean
|
|
53
|
+
|
|
54
|
+
### Auto Cleanup
|
|
55
|
+
|
|
56
|
+
- Disable console output
|
|
57
|
+
- Useful for background services
|
|
58
|
+
|
|
59
|
+
### Exception Handling
|
|
60
|
+
|
|
61
|
+
- Automatically captures unhandled exceptions
|
|
62
|
+
- Logs them as `CRITICAL`
|
|
63
|
+
|
|
64
|
+
### Desktop Notifications
|
|
65
|
+
|
|
66
|
+
- Optional desktop alerts for errors and critical logs
|
|
67
|
+
- Uses `plyer.notification`
|
|
68
|
+
|
|
69
|
+
### Asynchronous Logging
|
|
70
|
+
|
|
71
|
+
- Non-blocking log processing using threads and queues
|
|
72
|
+
- Improves performance in high-load environments
|
|
12
73
|
|
|
13
74
|
## Support
|
|
14
75
|
|
|
@@ -54,12 +115,4 @@ logger = VersaLog(enum="detailed", tag="a", show_tag=True)
|
|
|
54
115
|
|
|
55
116
|
# two tag
|
|
56
117
|
logger = VersaLog(enum="detailed", tag=["a", "a"], show_tag=True)
|
|
57
|
-
``` |
|
|
58
|
-
|
|
59
|
-
## Log save
|
|
60
|
-
|
|
61
|
-
````
|
|
62
|
-
|
|
63
|
-
[2025-08-06 04:10:36][INFO] : ok
|
|
64
|
-
|
|
65
118
|
```
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from .core import VersaLog
|
|
2
|
+
from .handler import VersaLogHandler
|
|
3
|
+
from .integrations.auto import auto_setup
|
|
4
|
+
from .integrations.fastapi import setup_fastapi_logging
|
|
5
|
+
from .integrations.flask import setup_flask_logging
|
|
6
|
+
from .integrations.django import setup_django_logging
|
|
7
|
+
|
|
8
|
+
__copyright__ = "Copyright 2025 by Kayu0514"
|
|
9
|
+
__version__ = "2.6.0"
|
|
10
|
+
__author__ = "Kayu0514"
|
|
11
|
+
__url__ = "https://github.com/kayu0514"
|
|
12
|
+
|
|
13
|
+
__all__ = ["VersaLog", "VersaLogHandler", "auto_setup", "setup_fastapi_logging","setup_flask_logging", "setup_django_logging"]
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
|
|
3
|
+
from .generic import setup_logging
|
|
4
|
+
from .fastapi import setup_fastapi_logging
|
|
5
|
+
from .flask import setup_flask_logging
|
|
6
|
+
from .django import setup_django_logging
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def auto_setup(versalog):
|
|
10
|
+
"""
|
|
11
|
+
Automatically detects the runtime environment
|
|
12
|
+
and applies the appropriate logging configuration.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
if "uvicorn" in sys.modules:
|
|
16
|
+
setup_fastapi_logging(versalog)
|
|
17
|
+
return "fastapi"
|
|
18
|
+
|
|
19
|
+
if "gunicorn" in sys.modules:
|
|
20
|
+
setup_fastapi_logging(versalog)
|
|
21
|
+
return "gunicorn"
|
|
22
|
+
|
|
23
|
+
if "flask" in sys.modules:
|
|
24
|
+
setup_flask_logging(None, versalog)
|
|
25
|
+
return "flask"
|
|
26
|
+
|
|
27
|
+
if "django" in sys.modules:
|
|
28
|
+
setup_django_logging(versalog)
|
|
29
|
+
return "django"
|
|
30
|
+
|
|
31
|
+
setup_logging(versalog)
|
|
32
|
+
return "generic"
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
from ..handler import VersaLogHandler
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
def setup_logging(versalog):
|
|
6
|
+
handler = VersaLogHandler(versalog)
|
|
7
|
+
|
|
8
|
+
root = logging.getLogger()
|
|
9
|
+
|
|
10
|
+
for h in root.handlers[:]:
|
|
11
|
+
root.removeHandler(h)
|
|
12
|
+
|
|
13
|
+
root.setLevel(logging.NOTSET)
|
|
14
|
+
root.addHandler(handler)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: VersaLog
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.6.0
|
|
4
4
|
Summary: Versatile logging library.
|
|
5
5
|
Home-page:
|
|
6
6
|
Author:
|
|
@@ -17,6 +17,7 @@ Classifier: Operating System :: OS Independent
|
|
|
17
17
|
Requires-Python: >=3.8, <3.14
|
|
18
18
|
Description-Content-Type: text/markdown
|
|
19
19
|
License-File: LICENSE
|
|
20
|
+
Requires-Dist: plyer
|
|
20
21
|
|
|
21
22
|
## What is VersaLog.py?
|
|
22
23
|
|
|
@@ -27,8 +28,69 @@ License-File: LICENSE
|
|
|
27
28
|
[](https://discord.gg/Ms2ejEES)
|
|
28
29
|
|
|
29
30
|
What is VersaLog.py?
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
|
|
32
|
+
VersaLog is a modern, powerful, and flexible logging library for Python.
|
|
33
|
+
It supports everything from simple usage to advanced, highly customizable configurations, making it suitable for a wide range of use cases.
|
|
34
|
+
|
|
35
|
+
## Feature
|
|
36
|
+
|
|
37
|
+
### Basic Logging
|
|
38
|
+
|
|
39
|
+
- Supports standard log levels:
|
|
40
|
+
- `INFO`, `ERROR`, `WARNING`, `DEBUG`, `CRITICAL`
|
|
41
|
+
- Colored output for better readability
|
|
42
|
+
- Symbol-based prefixes (e.g. `[+]`, `[-]`, `[!]`)
|
|
43
|
+
|
|
44
|
+
### Multiple Output Formats
|
|
45
|
+
|
|
46
|
+
**Easily switch between different log styles:**
|
|
47
|
+
|
|
48
|
+
- `simple` → `[+] message`
|
|
49
|
+
- `simple2` → `[TIME] [+] message`
|
|
50
|
+
- `detailed` → `[TIME][LEVEL] : message`
|
|
51
|
+
- `file` → `[FILE:LINE][LEVEL] message`
|
|
52
|
+
|
|
53
|
+
### Tag System
|
|
54
|
+
|
|
55
|
+
- Add custom tags to logs
|
|
56
|
+
- Supports multiple tags (e.g. `["API", "AUTH"]`)
|
|
57
|
+
- Optional default tags
|
|
58
|
+
|
|
59
|
+
### File & Line Tracking
|
|
60
|
+
|
|
61
|
+
- Display caller file name and line number
|
|
62
|
+
- Useful for debugging large projects
|
|
63
|
+
|
|
64
|
+
### Log File Saving
|
|
65
|
+
|
|
66
|
+
- Automatically save logs to files
|
|
67
|
+
- Output path: `./log/YYYY-MM-DD.log`
|
|
68
|
+
- Select which log levels to save
|
|
69
|
+
|
|
70
|
+
### Auto Cleanup
|
|
71
|
+
|
|
72
|
+
- Automatically deletes old log files (default: 7 days)
|
|
73
|
+
- Keeps your log directory clean
|
|
74
|
+
|
|
75
|
+
### Auto Cleanup
|
|
76
|
+
|
|
77
|
+
- Disable console output
|
|
78
|
+
- Useful for background services
|
|
79
|
+
|
|
80
|
+
### Exception Handling
|
|
81
|
+
|
|
82
|
+
- Automatically captures unhandled exceptions
|
|
83
|
+
- Logs them as `CRITICAL`
|
|
84
|
+
|
|
85
|
+
### Desktop Notifications
|
|
86
|
+
|
|
87
|
+
- Optional desktop alerts for errors and critical logs
|
|
88
|
+
- Uses `plyer.notification`
|
|
89
|
+
|
|
90
|
+
### Asynchronous Logging
|
|
91
|
+
|
|
92
|
+
- Non-blocking log processing using threads and queues
|
|
93
|
+
- Improves performance in high-load environments
|
|
32
94
|
|
|
33
95
|
## Support
|
|
34
96
|
|
|
@@ -74,12 +136,4 @@ logger = VersaLog(enum="detailed", tag="a", show_tag=True)
|
|
|
74
136
|
|
|
75
137
|
# two tag
|
|
76
138
|
logger = VersaLog(enum="detailed", tag=["a", "a"], show_tag=True)
|
|
77
|
-
``` |
|
|
78
|
-
|
|
79
|
-
## Log save
|
|
80
|
-
|
|
81
|
-
````
|
|
82
|
-
|
|
83
|
-
[2025-08-06 04:10:36][INFO] : ok
|
|
84
|
-
|
|
85
139
|
```
|
|
@@ -7,6 +7,11 @@ VersaLog/handler.py
|
|
|
7
7
|
VersaLog.egg-info/PKG-INFO
|
|
8
8
|
VersaLog.egg-info/SOURCES.txt
|
|
9
9
|
VersaLog.egg-info/dependency_links.txt
|
|
10
|
+
VersaLog.egg-info/requires.txt
|
|
10
11
|
VersaLog.egg-info/top_level.txt
|
|
11
12
|
VersaLog/integrations/__init__.py
|
|
12
|
-
VersaLog/integrations/
|
|
13
|
+
VersaLog/integrations/auto.py
|
|
14
|
+
VersaLog/integrations/django.py
|
|
15
|
+
VersaLog/integrations/fastapi.py
|
|
16
|
+
VersaLog/integrations/flask.py
|
|
17
|
+
VersaLog/integrations/generic.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
plyer
|
|
@@ -5,7 +5,7 @@ with open("README.md", encoding="utf-8") as f:
|
|
|
5
5
|
|
|
6
6
|
setup(
|
|
7
7
|
name="VersaLog",
|
|
8
|
-
version="2.
|
|
8
|
+
version="2.6.0",
|
|
9
9
|
description="Versatile logging library.",
|
|
10
10
|
long_description=long_description,
|
|
11
11
|
long_description_content_type="text/markdown",
|
|
@@ -13,7 +13,9 @@ setup(
|
|
|
13
13
|
license="MIT",
|
|
14
14
|
packages=find_packages(include=["VersaLog", "VersaLog.*"]),
|
|
15
15
|
include_package_data=True,
|
|
16
|
-
install_requires=[
|
|
16
|
+
install_requires=[
|
|
17
|
+
"plyer"
|
|
18
|
+
],
|
|
17
19
|
python_requires=">=3.8, <3.14",
|
|
18
20
|
url="",
|
|
19
21
|
classifiers=[
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
from .core import VersaLog
|
|
2
|
-
from .handler import VersaLogHandler
|
|
3
|
-
from .integrations.fastapi import setup_fastapi_logging
|
|
4
|
-
|
|
5
|
-
__copyright__ = "Copyright 2025 by Kayu0514"
|
|
6
|
-
__version__ = "2.5.5"
|
|
7
|
-
__author__ = "Kayu0514"
|
|
8
|
-
__url__ = "https://github.com/kayu0514"
|
|
9
|
-
|
|
10
|
-
__all__ = ["VersaLog", "VersaLogHandler", "setup_fastapi_logging"]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|