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