Skip to content

Commit 1090912

Browse files
committed
v7.0.0
1 parent 9d9d91f commit 1090912

40 files changed

Lines changed: 328 additions & 337 deletions

.github/PULL_REQUEST_TEMPLATE

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,10 @@
1212
- [ ] Documentation
1313
- [ ] CI/CD or build configuration
1414
- [ ] Dependencies update
15+
- [ ] Other
1516

1617
## Testing
17-
- [ ] Unit tests added/updated
18-
- [ ] Integration tests added/updated
19-
- [ ] All existing tests pass
2018
- [ ] Manual testing performed
2119

22-
## Checklist
23-
- [ ] Code follows the project's style and conventions
24-
- [ ] Documentation updated (if applicable)
25-
- [ ] No new warnings or linter errors introduced
26-
- [ ] I have considered how this change may affect other services
27-
2820
## Reviewer
2921
- [ ] I understand that by approving this PR, I share responsibility for these changes

README.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
<h1 align="center">
2-
<img src="https://raw.githubusercontent.com/ddc/pythonLogs/main/assets/pythonLogs-icon.svg" alt="pythonLogs" width="150">
2+
<img src="https://raw.githubusercontent.com/ddc/pythonlogs/main/assets/pythonlogs-icon.svg" alt="pythonlogs" width="150">
33
<br>
4-
pythonLogs
4+
pythonlogs
55
</h1>
66

77
<p align="center">
88
<a href="https://github.com/sponsors/ddc"><img src="https://img.shields.io/static/v1?style=plastic&label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=ff69b4" alt="Sponsor"/></a>
99
<br>
10-
<a href="https://ko-fi.com/ddcsta"><img src="https://img.shields.io/badge/Ko--fi-ddcsta-FF5E5B?style=plastic&logo=kofi&logoColor=white&color=brightgreen" alt="Ko-fi"/></a>
10+
<a href="https://ko-fi.com/ddc"><img src="https://img.shields.io/badge/Ko--fi-ddc-FF5E5B?style=plastic&logo=kofi&logoColor=white&color=brightgreen" alt="Ko-fi"/></a>
1111
<a href="https://www.paypal.com/ncp/payment/6G9Z78QHUD4RJ"><img src="https://img.shields.io/badge/Donate-PayPal-brightgreen.svg?style=plastic&logo=paypal&logoColor=white" alt="Donate"/></a>
1212
<br>
13-
<a href="https://pypi.python.org/pypi/pythonLogs"><img src="https://img.shields.io/pypi/v/pythonLogs.svg?style=plastic&logo=python&cacheSeconds=3600" alt="PyPi"/></a>
14-
<a href="https://pepy.tech/projects/pythonLogs"><img src="https://img.shields.io/pepy/dt/pythonLogs?style=plastic&logo=pypi&logoColor=3776AB" alt="PyPI Downloads"/></a>
13+
<a href="https://pypi.python.org/pypi/pythonlogs"><img src="https://img.shields.io/pypi/v/pythonlogs.svg?style=plastic&logo=python&cacheSeconds=3600" alt="PyPi"/></a>
14+
<a href="https://pepy.tech/projects/pythonlogs"><img src="https://img.shields.io/pepy/dt/pythonlogs?style=plastic&logo=pypi&logoColor=3776AB" alt="PyPI Downloads"/></a>
1515
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg?style=plastic&logo=creativecommons&logoColor=white" alt="License: MIT"/></a>
1616
<br>
17-
<a href="https://www.python.org/downloads"><img src="https://img.shields.io/pypi/pyversions/pythonLogs.svg?style=plastic&logo=python&cacheSeconds=3600" alt="Python"/></a>
17+
<a href="https://www.python.org/downloads"><img src="https://img.shields.io/pypi/pyversions/pythonlogs.svg?style=plastic&logo=python&cacheSeconds=3600" alt="Python"/></a>
1818
<a href="https://github.com/astral-sh/uv"><img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json&style=plastic" alt="uv"/></a>
1919
<a href="https://github.com/astral-sh/ruff"><img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json&style=plastic" alt="Ruff"/></a>
2020
<br>
21-
<a href="https://github.com/ddc/pythonLogs/issues"><img src="https://img.shields.io/github/issues/ddc/pythonLogs?style=plastic&logo=github&logoColor=white" alt="issues"/></a>
22-
<a href="https://codecov.io/gh/ddc/pythonLogs"><img src="https://img.shields.io/codecov/c/github/ddc/pythonLogs?token=XWB53034GI&style=plastic&logo=codecov" alt="codecov"/></a>
23-
<a href="https://sonarcloud.io/dashboard?id=ddc_pythonLogs"><img src="https://img.shields.io/sonar/quality_gate/ddc_pythonLogs?server=https%3A%2F%2Fsonarcloud.io&style=plastic&logo=sonarqubecloud&logoColor=white" alt="Quality Gate Status"/></a>
24-
<a href="https://github.com/ddc/pythonLogs/actions/workflows/workflow.yml"><img src="https://img.shields.io/github/actions/workflow/status/ddc/pythonLogs/workflow.yml?style=plastic&logo=github&logoColor=white&label=CI%2FCD%20Pipeline" alt="CI/CD Pipeline"/></a>
25-
<a href="https://actions-badge.atrox.dev/ddc/pythonLogs/goto?ref=main"><img src="https://img.shields.io/endpoint.svg?url=https%3A//actions-badge.atrox.dev/ddc/pythonLogs/badge?ref=main&label=build&logo=github&style=plastic" alt="Build Status"/></a>
21+
<a href="https://github.com/ddc/pythonlogs/issues"><img src="https://img.shields.io/github/issues/ddc/pythonlogs?style=plastic&logo=github&logoColor=white" alt="issues"/></a>
22+
<a href="https://codecov.io/gh/ddc/pythonlogs"><img src="https://img.shields.io/codecov/c/github/ddc/pythonlogs?token=XWB53034GI&style=plastic&logo=codecov" alt="codecov"/></a>
23+
<a href="https://sonarcloud.io/dashboard?id=ddc_pythonlogs"><img src="https://img.shields.io/sonar/quality_gate/ddc_pythonlogs?server=https%3A%2F%2Fsonarcloud.io&style=plastic&logo=sonarqubecloud&logoColor=white" alt="Quality Gate Status"/></a>
24+
<a href="https://github.com/ddc/pythonlogs/actions/workflows/workflow.yml"><img src="https://img.shields.io/github/actions/workflow/status/ddc/pythonlogs/workflow.yml?style=plastic&logo=github&logoColor=white&label=CI%2FCD%20Pipeline" alt="CI/CD Pipeline"/></a>
25+
<a href="https://actions-badge.atrox.dev/ddc/pythonlogs/goto?ref=main"><img src="https://img.shields.io/endpoint.svg?url=https%3A//actions-badge.atrox.dev/ddc/pythonlogs/badge?ref=main&label=build&logo=github&style=plastic" alt="Build Status"/></a>
2626
</p>
2727

2828
<p align="center">High-performance Python logging library with file rotation and optimized caching for better performance</p>
@@ -69,7 +69,7 @@
6969
# Installation
7070

7171
```shell
72-
pip install pythonLogs
72+
pip install pythonlogs
7373
```
7474

7575

@@ -85,7 +85,7 @@ Console-only logging without file output. Perfect for development and simple app
8585
### Usage
8686

8787
```python
88-
from pythonLogs import BasicLog
88+
from pythonlogs import BasicLog
8989

9090
logger = BasicLog(
9191
name="my_app",
@@ -115,7 +115,7 @@ File-based logging with automatic rotation when files reach a specified size. Ro
115115
### Usage
116116

117117
```python
118-
from pythonLogs import SizeRotatingLog
118+
from pythonlogs import SizeRotatingLog
119119

120120
logger = SizeRotatingLog(
121121
name="my_app",
@@ -151,7 +151,7 @@ File-based logging with automatic rotation based on time intervals. Rotated file
151151
### Usage
152152

153153
```python
154-
from pythonLogs import TimedRotatingLog
154+
from pythonlogs import TimedRotatingLog
155155

156156
logger = TimedRotatingLog(
157157
name="my_app",
@@ -182,10 +182,10 @@ All logger types support context managers for automatic resource cleanup and exc
182182
## Usage Examples
183183

184184
```python
185-
from pythonLogs import LogLevel
186-
from pythonLogs.basic_log import BasicLog
187-
from pythonLogs.size_rotating import SizeRotatingLog
188-
from pythonLogs.timed_rotating import TimedRotatingLog
185+
from pythonlogs import LogLevel
186+
from pythonlogs.basic_log import BasicLog
187+
from pythonlogs.size_rotating import SizeRotatingLog
188+
from pythonlogs.timed_rotating import TimedRotatingLog
189189

190190
# Automatic cleanup with context managers
191191
with BasicLog(name="app", level=LogLevel.INFO) as logger:
@@ -212,7 +212,7 @@ except ValueError:
212212
# Using With Multiple Log Levels and Files
213213

214214
```python
215-
from pythonLogs import SizeRotatingLog, TimedRotatingLog, LogLevel, RotateWhen
215+
from pythonlogs import SizeRotatingLog, TimedRotatingLog, LogLevel, RotateWhen
216216

217217
# Application logger
218218
app_logger = SizeRotatingLog(
@@ -262,7 +262,7 @@ The .env variables file can be used by leaving all options blank when calling th
262262
If not specified inside the .env file, it will use the default value.\
263263
This is a good approach for production environments, since options can be changed easily.
264264
```python
265-
from pythonLogs import TimedRotatingLog
265+
from pythonlogs import TimedRotatingLog
266266
log = TimedRotatingLog()
267267
```
268268

@@ -294,7 +294,7 @@ LOG_ROTATE_FILE_SUFIX="%Y%m%d"
294294
Use `get_log_settings()` to inspect current configuration and `clear_settings_cache()` to reload configuration from environment variables:
295295

296296
```python
297-
from pythonLogs import get_log_settings, clear_settings_cache
297+
from pythonlogs import get_log_settings, clear_settings_cache
298298

299299
# Inspect current settings
300300
settings = get_log_settings()
@@ -318,7 +318,7 @@ clear_settings_cache(reload_env=False)
318318
You can use either enums (for type safety) or strings (for simplicity):
319319

320320
```python
321-
from pythonLogs import LogLevel, RotateWhen
321+
from pythonlogs import LogLevel, RotateWhen
322322

323323
# Option 1: Type-safe enums (recommended)
324324
LogLevel.DEBUG # "DEBUG"
@@ -399,8 +399,8 @@ Released under the [MIT License](LICENSE)
399399

400400
# Support
401401

402-
If you find this project helpful, consider supporting development:
402+
If you find this project helpful, consider supporting development.
403403

404-
- [GitHub Sponsor](https://github.com/sponsors/ddc)
405-
- [ko-fi](https://ko-fi.com/ddcsta)
406-
- [PayPal](https://www.paypal.com/ncp/payment/6G9Z78QHUD4RJ)
404+
<a href='https://github.com/sponsors/ddc' target='_blank'><img height='24' style='border:0px;height:24px;' src='https://img.shields.io/badge/Sponsor-❤-ea4aaa?style=plastic&logo=github&logoColor=white' border='0' alt='Sponsor on GitHub' /></a>
405+
<a href='https://ko-fi.com/ddc' target='_blank'><img height='30' style='border:0px;height:30px;' src='https://storage.ko-fi.com/cdn/kofi2.png?v=6' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
406+
<a href='https://www.paypal.com/ncp/payment/6G9Z78QHUD4RJ' target='_blank'><img height='30' style='border:0px;height:30px;' src='https://www.paypalobjects.com/digitalassets/c/website/marketing/apac/C2/logos-buttons/optimize/44_Yellow_PayPal_Pill_Button.png' border='0' alt='Donate via PayPal' /></a>

pyproject.toml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ build-backend = "hatchling.build"
66
allow-direct-references = true
77

88
[tool.hatch.build]
9-
include = ["pythonLogs/**/*"]
9+
include = ["pythonlogs/**/*"]
1010

1111
[tool.hatch.build.targets.wheel]
12-
packages = ["pythonLogs"]
12+
packages = ["pythonlogs"]
1313

1414
[project]
15-
name = "pythonLogs"
16-
version = "6.0.4"
15+
name = "pythonlogs"
16+
version = "7.0.0"
1717
description = "High-performance Python logging library with file rotation and optimized caching for better performance"
18-
urls.Repository = "https://github.com/ddc/pythonLogs"
19-
urls.Homepage = "https://pypi.org/project/pythonLogs"
18+
urls.Repository = "https://github.com/ddc/pythonlogs"
19+
urls.Homepage = "https://pypi.org/project/pythonlogs"
2020
license = {text = "MIT"}
2121
readme = "README.md"
2222
authors = [
@@ -28,7 +28,7 @@ maintainers = [
2828
keywords = [
2929
"python", "python3", "python-3",
3030
"log", "logging", "logger",
31-
"logutils", "log-utils", "pythonLogs"
31+
"logutils", "log-utils", "pythonlogs"
3232
]
3333
classifiers = [
3434
"Topic :: Software Development :: Libraries :: Python Modules",
@@ -54,7 +54,7 @@ dev = [
5454
"psutil>=7.2.2",
5555
"pytest-cov>=7.0.0",
5656
"poethepoet>=0.42.1",
57-
"ruff>=0.15.4",
57+
"ruff>=0.15.7",
5858
]
5959

6060
[tool.poe.tasks]
@@ -99,15 +99,15 @@ line-length = 120
9999
target-version = "py311"
100100

101101
[tool.ruff.lint]
102-
select = ["E", "W", "F", "I", "B", "C4", "UP"]
102+
select = ["E", "W", "F", "I", "B", "C4", "UP", "S", "SLF"]
103103
ignore = ["E501", "E402", "UP046", "UP047"]
104104

105105
[tool.ruff.lint.per-file-ignores]
106106
"__init__.py" = ["F401"]
107-
"tests/**/*.py" = ["S101", "S105", "S106", "S311", "SLF001", "F841"]
107+
"tests/**/*.py" = ["S101", "S103", "S105", "S106", "S110", "S311", "S603", "S607", "SLF001", "F841"]
108108

109109
[tool.ruff.lint.isort]
110-
known-first-party = ["pythonLogs"]
110+
known-first-party = ["pythonlogs"]
111111
force-sort-within-sections = false
112112
from-first = false
113113
no-sections = true
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# pythonLogs Environment Configuration
1+
# pythonlogs Environment Configuration
22
# Copy this file to .env and modify values as needed
33

44
# Main Settings
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import logging
22
from importlib.metadata import version
3-
from pythonLogs.core.constants import LogLevel, RotateWhen
4-
from pythonLogs.core.factory import BasicLog, SizeRotatingLog, TimedRotatingLog
5-
from pythonLogs.core.settings import clear_settings_cache, get_log_settings
3+
from pythonlogs.core.constants import LogLevel, RotateWhen
4+
from pythonlogs.core.factory import BasicLog, SizeRotatingLog, TimedRotatingLog
5+
from pythonlogs.core.settings import clear_settings_cache, get_log_settings
66

77
__all__ = (
88
"BasicLog",
@@ -14,7 +14,7 @@
1414
"get_log_settings",
1515
)
1616

17-
__title__ = "pythonLogs"
17+
__title__ = "pythonlogs"
1818
__author__ = "Daniel Costa"
1919
__email__ = "daniel@ddcsoftwares.com"
2020
__license__ = "MIT"
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import logging
2-
from pythonLogs.core.log_utils import cleanup_logger_handlers, get_format, get_level, get_timezone_function
3-
from pythonLogs.core.memory_utils import register_logger_weakref
4-
from pythonLogs.core.settings import get_log_settings
5-
from pythonLogs.core.thread_safety import auto_thread_safe
2+
from pythonlogs.core.log_utils import cleanup_logger_handlers, get_format, get_level, get_timezone_function
3+
from pythonlogs.core.memory_utils import register_logger_weakref
4+
from pythonlogs.core.settings import get_log_settings
5+
from pythonlogs.core.thread_safety import auto_thread_safe
66

77

88
@auto_thread_safe(["init"])
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
import time
55
from dataclasses import dataclass
66
from enum import StrEnum
7-
from pythonLogs.basic_log import BasicLog as _BasicLogImpl
8-
from pythonLogs.core.constants import LogLevel, RotateWhen
9-
from pythonLogs.core.log_utils import cleanup_logger_handlers
10-
from pythonLogs.core.settings import get_log_settings
11-
from pythonLogs.size_rotating import SizeRotatingLog as _SizeRotatingLogImpl
12-
from pythonLogs.timed_rotating import TimedRotatingLog as _TimedRotatingLogImpl
7+
from pythonlogs.basic_log import BasicLog as _BasicLogImpl
8+
from pythonlogs.core.constants import LogLevel, RotateWhen
9+
from pythonlogs.core.log_utils import cleanup_logger_handlers
10+
from pythonlogs.core.settings import get_log_settings
11+
from pythonlogs.size_rotating import SizeRotatingLog as _SizeRotatingLogImpl
12+
from pythonlogs.timed_rotating import TimedRotatingLog as _TimedRotatingLogImpl
1313
from typing import assert_never
1414

1515

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from datetime import UTC, datetime, timedelta
1212
from functools import lru_cache
1313
from pathlib import Path
14-
from pythonLogs.core.constants import DEFAULT_FILE_MODE, LEVEL_MAP
14+
from pythonlogs.core.constants import DEFAULT_FILE_MODE, LEVEL_MAP
1515
from zoneinfo import ZoneInfo
1616

1717

0 commit comments

Comments
 (0)