Skip to content

Commit 861cb2b

Browse files
committed
version 0.2.2; fixed stacklevel
1 parent c56a311 commit 861cb2b

File tree

3 files changed

+20
-21
lines changed

3 files changed

+20
-21
lines changed

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ packages = ["unilogging"]
1010

1111
[project]
1212
name = "unilogging"
13-
version = "0.2.1"
13+
version = "0.2.2"
1414
description = "A simple library for working with the context of logs."
1515
readme = "README.md"
1616
requires-python = ">=3.12"
@@ -21,7 +21,6 @@ license = { text = "MIT" }
2121
keywords = ["logging", "context", "structured-logging", "python-logging"]
2222
classifiers = [
2323
"Programming Language :: Python :: 3",
24-
"Programming Language :: Python :: 3.11",
2524
"Programming Language :: Python :: 3.12",
2625
"Programming Language :: Python :: 3.13",
2726
"Programming Language :: Python :: 3.14",

unilogging/logger.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def debug(
3939
self, msg: str,
4040
exception: BaseException | None = None,
4141
/,
42-
stack_info: bool = False, stacklevel: int = 1,
42+
stack_info: bool = False, stacklevel: int = 3,
4343
**state,
4444
):
4545
"""Log message with DEBUG level."""
@@ -50,7 +50,7 @@ def info(
5050
self, msg: str,
5151
exception: BaseException | None = None,
5252
/,
53-
stack_info: bool = False, stacklevel: int = 1,
53+
stack_info: bool = False, stacklevel: int = 3,
5454
**state,
5555
):
5656
"""Log message with INFO level."""
@@ -61,7 +61,7 @@ def warn(
6161
self, msg: str,
6262
exception: BaseException | None = None,
6363
/,
64-
stack_info: bool = False, stacklevel: int = 1,
64+
stack_info: bool = False, stacklevel: int = 3,
6565
**state,
6666
):
6767
"""Log message with WARNING level."""
@@ -72,7 +72,7 @@ def warning(
7272
self, msg: str,
7373
exception: BaseException | None = None,
7474
/,
75-
stack_info: bool = False, stacklevel: int = 1,
75+
stack_info: bool = False, stacklevel: int = 3,
7676
**state,
7777
):
7878
"""Log message with WARNING level."""
@@ -83,7 +83,7 @@ def error(
8383
self, msg: str,
8484
exception: BaseException | None = None,
8585
/,
86-
stack_info: bool = False, stacklevel: int = 1,
86+
stack_info: bool = False, stacklevel: int = 3,
8787
**state,
8888
):
8989
"""Log message with ERROR level."""
@@ -94,7 +94,7 @@ def exception(
9494
self, msg: str,
9595
exception: BaseException | bool | None = True,
9696
/,
97-
stack_info: bool = False, stacklevel: int = 1,
97+
stack_info: bool = False, stacklevel: int = 3,
9898
**state,
9999
):
100100
"""Log message with ERROR level and exception info."""
@@ -105,7 +105,7 @@ def fatal(
105105
self, msg: str,
106106
exception: BaseException | None = None,
107107
/,
108-
stack_info: bool = False, stacklevel: int = 1,
108+
stack_info: bool = False, stacklevel: int = 3,
109109
**state,
110110
):
111111
"""Log message with FATAL level."""
@@ -116,7 +116,7 @@ def critical(
116116
self, msg: str,
117117
exception: BaseException | None = None,
118118
/,
119-
stack_info: bool = False, stacklevel: int = 1,
119+
stack_info: bool = False, stacklevel: int = 3,
120120
**state,
121121
):
122122
"""Log message with CRITICAL level."""
@@ -127,7 +127,7 @@ def log(
127127
self, level: int, msg: str,
128128
exception: BaseException | None = None,
129129
/,
130-
stack_info: bool = False, stacklevel: int = 1,
130+
stack_info: bool = False, stacklevel: int = 2,
131131
**state,
132132
):
133133
"""Log message."""
@@ -179,7 +179,7 @@ def log(
179179
self, level: int, msg: str,
180180
exception: BaseException | bool | None = None,
181181
/,
182-
stack_info: bool = False, stacklevel: int = 1,
182+
stack_info: bool = False, stacklevel: int = 2,
183183
**state,
184184
):
185185
"""Log message."""
@@ -195,7 +195,7 @@ def debug(
195195
self, msg: str,
196196
exception: BaseException | None = None,
197197
/,
198-
stack_info: bool = False, stacklevel: int = 1,
198+
stack_info: bool = False, stacklevel: int = 3,
199199
**state,
200200
):
201201
"""Log message with DEBUG level."""
@@ -209,7 +209,7 @@ def info(
209209
self, msg: str,
210210
exception: BaseException | None = None,
211211
/,
212-
stack_info: bool = False, stacklevel: int = 1,
212+
stack_info: bool = False, stacklevel: int = 3,
213213
**state,
214214
):
215215
"""Log message with INFO level."""
@@ -223,7 +223,7 @@ def warn(
223223
self, msg: str,
224224
exception: BaseException | None = None,
225225
/,
226-
stack_info: bool = False, stacklevel: int = 1,
226+
stack_info: bool = False, stacklevel: int = 3,
227227
**state,
228228
):
229229
"""Log message with WARNING level."""
@@ -237,7 +237,7 @@ def warning(
237237
self, msg: str,
238238
exception: BaseException | None = None,
239239
/,
240-
stack_info: bool = False, stacklevel: int = 1,
240+
stack_info: bool = False, stacklevel: int = 3,
241241
**state,
242242
):
243243
"""Log message with WARNING level."""
@@ -251,7 +251,7 @@ def error(
251251
self, msg: str,
252252
exception: BaseException | None = None,
253253
/,
254-
stack_info: bool = False, stacklevel: int = 1,
254+
stack_info: bool = False, stacklevel: int = 3,
255255
**state,
256256
):
257257
"""Log message with ERROR level."""
@@ -265,7 +265,7 @@ def exception(
265265
self, msg: str,
266266
exception: BaseException | bool | None = True,
267267
/,
268-
stack_info: bool = False, stacklevel: int = 1,
268+
stack_info: bool = False, stacklevel: int = 3,
269269
**state,
270270
):
271271
"""Log message with ERROR level and exception info."""
@@ -279,7 +279,7 @@ def fatal(
279279
self, msg: str,
280280
exception: BaseException | None = None,
281281
/,
282-
stack_info: bool = False, stacklevel: int = 1,
282+
stack_info: bool = False, stacklevel: int = 3,
283283
**state,
284284
):
285285
"""Log message with FATAL level."""
@@ -293,7 +293,7 @@ def critical(
293293
self, msg: str,
294294
exception: BaseException | None = None,
295295
/,
296-
stack_info: bool = False, stacklevel: int = 1,
296+
stack_info: bool = False, stacklevel: int = 3,
297297
**state,
298298
):
299299
"""Log message with CRITICAL level."""

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)