miu-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.
@@ -0,0 +1,152 @@
1
+ Metadata-Version: 2.4
2
+ Name: miu-logger
3
+ Version: 0.1.1
4
+ Summary: Multiprocessing-safe domain-based logging framework with QueueListener architecture
5
+ Author-email: Bruno Miura <brumiura@gmail.com>
6
+ License: MIT
7
+ Keywords: logging,multiprocessing,queue,structured-logging,python-logging
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3 :: Only
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Topic :: System :: Logging
13
+ Requires-Python: >=3.10
14
+ Description-Content-Type: text/markdown
15
+ License-File: LICENSE
16
+ Requires-Dist: colorama
17
+ Dynamic: license-file
18
+
19
+ ```python
20
+ repo = LoggingRepository(config)
21
+ queue = repo.get_queue()
22
+ ```
23
+
24
+ **Worker processes:**
25
+
26
+ ```python
27
+ worker_repo = LoggingRepository(config, use_listener=False, queue=queue)
28
+ worker_repo.task.info("Worker started")
29
+ ```
30
+
31
+ All processes log safely to the same listener and files.
32
+
33
+ ---
34
+
35
+ ## Debug Control
36
+
37
+ Only `.debug()` messages are conditional via `debug_enabled`:
38
+
39
+ ```python
40
+ config.debug_enabled = False
41
+ repo.app.debug("Won't appear")
42
+ repo.app.info("Will appear")
43
+ ```
44
+
45
+ Useful for toggling debug messages in production.
46
+
47
+ ---
48
+
49
+ ## Output Structure
50
+
51
+ Logs are written in:
52
+
53
+ ```
54
+ logs/
55
+ ├─ app.log # domain logs
56
+ ├─ db.log
57
+ ├─ redis.log
58
+ ├─ debug.log # per-level logs
59
+ ├─ info.log
60
+ ├─ warning.log
61
+ └─ error.log
62
+ ```
63
+
64
+ Console output is **colorized** by level:
65
+
66
+ * DEBUG → blue
67
+ * INFO → green
68
+ * WARNING → yellow
69
+ * ERROR → red
70
+
71
+ Files remain clean.
72
+
73
+ ---
74
+
75
+ ## Graceful Shutdown
76
+
77
+ The repository automatically shuts down on process exit and supports manual shutdown:
78
+
79
+ ```python
80
+ repo.shutdown()
81
+ ```
82
+
83
+ ---
84
+
85
+ ## Typical Usage Example
86
+
87
+ ```python
88
+ repo.app.info("Service starting")
89
+
90
+ try:
91
+ connect_db()
92
+ except Exception:
93
+ repo.db.exception("DB connection failed")
94
+
95
+ repo.redis.debug("Cache size: %d", cache_size)
96
+ ```
97
+
98
+ **Multiprocessing workers:**
99
+
100
+ ```python
101
+ def worker(queue):
102
+ repo = LoggingRepository(config, use_listener=False, queue=queue)
103
+ repo.task.info("Worker task started")
104
+ ```
105
+
106
+ ---
107
+
108
+ ## Project Structure
109
+
110
+ ```
111
+ miu_logger/
112
+ ├─ repository.py # main LoggingRepository
113
+ ├─ listener.py # QueueListener and handler setup
114
+ ├─ logger_factory.py # logger creation functions
115
+ ├─ conditional.py # ConditionalLogger
116
+ ├─ filters.py # Logger filters
117
+ ├─ formatters.py # ColoredFormatter
118
+ ├─ config.py # LogConfig definition
119
+ └─ stubgen.py # stub generator for IDE autocomplete
120
+ ```
121
+
122
+ ---
123
+
124
+ ## When to Use
125
+
126
+ * Services with many subsystems
127
+ * Multiprocessing ingestion pipelines
128
+ * Long-running daemons
129
+ * Kubernetes / systemd services
130
+ * Need for clear operational logs
131
+
132
+ ---
133
+
134
+ ## When Not to Use
135
+
136
+ * Single-file scripts
137
+ * No multiprocessing
138
+ * No domain separation required
139
+
140
+ Plain `logging` is sufficient in those cases.
141
+
142
+ ---
143
+
144
+ ## License
145
+
146
+ MIT
147
+
148
+ ---
149
+
150
+ ## Author
151
+
152
+ **Bruno Miura**
@@ -0,0 +1,134 @@
1
+ ```python
2
+ repo = LoggingRepository(config)
3
+ queue = repo.get_queue()
4
+ ```
5
+
6
+ **Worker processes:**
7
+
8
+ ```python
9
+ worker_repo = LoggingRepository(config, use_listener=False, queue=queue)
10
+ worker_repo.task.info("Worker started")
11
+ ```
12
+
13
+ All processes log safely to the same listener and files.
14
+
15
+ ---
16
+
17
+ ## Debug Control
18
+
19
+ Only `.debug()` messages are conditional via `debug_enabled`:
20
+
21
+ ```python
22
+ config.debug_enabled = False
23
+ repo.app.debug("Won't appear")
24
+ repo.app.info("Will appear")
25
+ ```
26
+
27
+ Useful for toggling debug messages in production.
28
+
29
+ ---
30
+
31
+ ## Output Structure
32
+
33
+ Logs are written in:
34
+
35
+ ```
36
+ logs/
37
+ ├─ app.log # domain logs
38
+ ├─ db.log
39
+ ├─ redis.log
40
+ ├─ debug.log # per-level logs
41
+ ├─ info.log
42
+ ├─ warning.log
43
+ └─ error.log
44
+ ```
45
+
46
+ Console output is **colorized** by level:
47
+
48
+ * DEBUG → blue
49
+ * INFO → green
50
+ * WARNING → yellow
51
+ * ERROR → red
52
+
53
+ Files remain clean.
54
+
55
+ ---
56
+
57
+ ## Graceful Shutdown
58
+
59
+ The repository automatically shuts down on process exit and supports manual shutdown:
60
+
61
+ ```python
62
+ repo.shutdown()
63
+ ```
64
+
65
+ ---
66
+
67
+ ## Typical Usage Example
68
+
69
+ ```python
70
+ repo.app.info("Service starting")
71
+
72
+ try:
73
+ connect_db()
74
+ except Exception:
75
+ repo.db.exception("DB connection failed")
76
+
77
+ repo.redis.debug("Cache size: %d", cache_size)
78
+ ```
79
+
80
+ **Multiprocessing workers:**
81
+
82
+ ```python
83
+ def worker(queue):
84
+ repo = LoggingRepository(config, use_listener=False, queue=queue)
85
+ repo.task.info("Worker task started")
86
+ ```
87
+
88
+ ---
89
+
90
+ ## Project Structure
91
+
92
+ ```
93
+ miu_logger/
94
+ ├─ repository.py # main LoggingRepository
95
+ ├─ listener.py # QueueListener and handler setup
96
+ ├─ logger_factory.py # logger creation functions
97
+ ├─ conditional.py # ConditionalLogger
98
+ ├─ filters.py # Logger filters
99
+ ├─ formatters.py # ColoredFormatter
100
+ ├─ config.py # LogConfig definition
101
+ └─ stubgen.py # stub generator for IDE autocomplete
102
+ ```
103
+
104
+ ---
105
+
106
+ ## When to Use
107
+
108
+ * Services with many subsystems
109
+ * Multiprocessing ingestion pipelines
110
+ * Long-running daemons
111
+ * Kubernetes / systemd services
112
+ * Need for clear operational logs
113
+
114
+ ---
115
+
116
+ ## When Not to Use
117
+
118
+ * Single-file scripts
119
+ * No multiprocessing
120
+ * No domain separation required
121
+
122
+ Plain `logging` is sufficient in those cases.
123
+
124
+ ---
125
+
126
+ ## License
127
+
128
+ MIT
129
+
130
+ ---
131
+
132
+ ## Author
133
+
134
+ **Bruno Miura**
@@ -0,0 +1,32 @@
1
+ [project]
2
+ name = "miu-logger"
3
+ version = "0.1.1"
4
+ description = "Multiprocessing-safe domain-based logging framework with QueueListener architecture"
5
+ readme = "README.md"
6
+ requires-python = ">=3.10"
7
+ license = {text = "MIT"}
8
+ authors = [
9
+ { name = "Bruno Miura", email = "brumiura@gmail.com" }
10
+ ]
11
+ keywords = ["logging", "multiprocessing", "queue", "structured-logging", "python-logging"]
12
+ classifiers = [
13
+ "Programming Language :: Python :: 3",
14
+ "Programming Language :: Python :: 3 :: Only",
15
+ "License :: OSI Approved :: MIT License",
16
+ "Operating System :: OS Independent",
17
+ "Topic :: System :: Logging",
18
+ ]
19
+
20
+ dependencies = [
21
+ "colorama"
22
+ ]
23
+
24
+ [build-system]
25
+ requires = ["setuptools", "wheel"]
26
+ build-backend = "setuptools.build_meta"
27
+
28
+ [tool.setuptools]
29
+ package-dir = {"" = "src"}
30
+
31
+ [tool.setuptools.packages.find]
32
+ where = ["src"]
@@ -0,0 +1,152 @@
1
+ Metadata-Version: 2.4
2
+ Name: miu-logger
3
+ Version: 0.1.1
4
+ Summary: Multiprocessing-safe domain-based logging framework with QueueListener architecture
5
+ Author-email: Bruno Miura <brumiura@gmail.com>
6
+ License: MIT
7
+ Keywords: logging,multiprocessing,queue,structured-logging,python-logging
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Programming Language :: Python :: 3 :: Only
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Topic :: System :: Logging
13
+ Requires-Python: >=3.10
14
+ Description-Content-Type: text/markdown
15
+ License-File: LICENSE
16
+ Requires-Dist: colorama
17
+ Dynamic: license-file
18
+
19
+ ```python
20
+ repo = LoggingRepository(config)
21
+ queue = repo.get_queue()
22
+ ```
23
+
24
+ **Worker processes:**
25
+
26
+ ```python
27
+ worker_repo = LoggingRepository(config, use_listener=False, queue=queue)
28
+ worker_repo.task.info("Worker started")
29
+ ```
30
+
31
+ All processes log safely to the same listener and files.
32
+
33
+ ---
34
+
35
+ ## Debug Control
36
+
37
+ Only `.debug()` messages are conditional via `debug_enabled`:
38
+
39
+ ```python
40
+ config.debug_enabled = False
41
+ repo.app.debug("Won't appear")
42
+ repo.app.info("Will appear")
43
+ ```
44
+
45
+ Useful for toggling debug messages in production.
46
+
47
+ ---
48
+
49
+ ## Output Structure
50
+
51
+ Logs are written in:
52
+
53
+ ```
54
+ logs/
55
+ ├─ app.log # domain logs
56
+ ├─ db.log
57
+ ├─ redis.log
58
+ ├─ debug.log # per-level logs
59
+ ├─ info.log
60
+ ├─ warning.log
61
+ └─ error.log
62
+ ```
63
+
64
+ Console output is **colorized** by level:
65
+
66
+ * DEBUG → blue
67
+ * INFO → green
68
+ * WARNING → yellow
69
+ * ERROR → red
70
+
71
+ Files remain clean.
72
+
73
+ ---
74
+
75
+ ## Graceful Shutdown
76
+
77
+ The repository automatically shuts down on process exit and supports manual shutdown:
78
+
79
+ ```python
80
+ repo.shutdown()
81
+ ```
82
+
83
+ ---
84
+
85
+ ## Typical Usage Example
86
+
87
+ ```python
88
+ repo.app.info("Service starting")
89
+
90
+ try:
91
+ connect_db()
92
+ except Exception:
93
+ repo.db.exception("DB connection failed")
94
+
95
+ repo.redis.debug("Cache size: %d", cache_size)
96
+ ```
97
+
98
+ **Multiprocessing workers:**
99
+
100
+ ```python
101
+ def worker(queue):
102
+ repo = LoggingRepository(config, use_listener=False, queue=queue)
103
+ repo.task.info("Worker task started")
104
+ ```
105
+
106
+ ---
107
+
108
+ ## Project Structure
109
+
110
+ ```
111
+ miu_logger/
112
+ ├─ repository.py # main LoggingRepository
113
+ ├─ listener.py # QueueListener and handler setup
114
+ ├─ logger_factory.py # logger creation functions
115
+ ├─ conditional.py # ConditionalLogger
116
+ ├─ filters.py # Logger filters
117
+ ├─ formatters.py # ColoredFormatter
118
+ ├─ config.py # LogConfig definition
119
+ └─ stubgen.py # stub generator for IDE autocomplete
120
+ ```
121
+
122
+ ---
123
+
124
+ ## When to Use
125
+
126
+ * Services with many subsystems
127
+ * Multiprocessing ingestion pipelines
128
+ * Long-running daemons
129
+ * Kubernetes / systemd services
130
+ * Need for clear operational logs
131
+
132
+ ---
133
+
134
+ ## When Not to Use
135
+
136
+ * Single-file scripts
137
+ * No multiprocessing
138
+ * No domain separation required
139
+
140
+ Plain `logging` is sufficient in those cases.
141
+
142
+ ---
143
+
144
+ ## License
145
+
146
+ MIT
147
+
148
+ ---
149
+
150
+ ## Author
151
+
152
+ **Bruno Miura**
@@ -9,6 +9,7 @@ src/miu_logger/formatters.py
9
9
  src/miu_logger/listener.py
10
10
  src/miu_logger/logger_factory.py
11
11
  src/miu_logger/repository.py
12
+ src/miu_logger/stubgen.py
12
13
  src/miu_logger.egg-info/PKG-INFO
13
14
  src/miu_logger.egg-info/SOURCES.txt
14
15
  src/miu_logger.egg-info/dependency_links.txt
miu_logger-0.1.0/PKG-INFO DELETED
@@ -1,10 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: miu-logger
3
- Version: 0.1.0
4
- Summary: Multiprocessing-safe structured logging framework
5
- Author: Bruno Miura
6
- Requires-Python: >=3.10
7
- Description-Content-Type: text/markdown
8
- License-File: LICENSE
9
- Requires-Dist: colorama
10
- Dynamic: license-file
@@ -1,21 +0,0 @@
1
- [project]
2
- name = "miu-logger"
3
- version = "0.1.0"
4
- description = "Multiprocessing-safe structured logging framework"
5
- authors = [{name="Bruno Miura"}]
6
- requires-python = ">=3.10"
7
- dependencies = [
8
- "colorama",
9
- ]
10
- readme = "README.md"
11
-
12
- [build-system]
13
- requires = ["setuptools", "wheel"]
14
- build-backend = "setuptools.build_meta"
15
-
16
- [tool.setuptools]
17
- package-dir = {"" = "src"}
18
-
19
- [tool.setuptools.packages.find]
20
- where = ["src"]
21
-
@@ -1,10 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: miu-logger
3
- Version: 0.1.0
4
- Summary: Multiprocessing-safe structured logging framework
5
- Author: Bruno Miura
6
- Requires-Python: >=3.10
7
- Description-Content-Type: text/markdown
8
- License-File: LICENSE
9
- Requires-Dist: colorama
10
- Dynamic: license-file
File without changes
File without changes