Skip to content

Release v6.0.0

Choose a tag to compare

@github-actions github-actions released this 26 Jan 20:36
· 14 commits to main since this release
ec66a12

⚠️ Breaking Changes v6.0.0

The API has been simplified. You now import classes directly instead of using factory functions:

Before (v5.x):

from pythonLogs import get_basic_log, get_size_rotating_log, get_timed_rotating_log
logger = get_timed_rotating_log(name="myapp", directory="/logs")

After (v6.0.0):

from pythonLogs import BasicLog, SizeRotatingLog, TimedRotatingLog
logger = TimedRotatingLog(name="myapp", directory="/logs")

Migration Guide

┌──────────────────────────┬─────────────────────┐
│    Old Import (v5.x)     │ New Import (v6.0.0) │
├──────────────────────────┼─────────────────────┤
│ get_basic_log()          │ BasicLog()          │
├──────────────────────────┼─────────────────────┤
│ get_size_rotating_log()  │ SizeRotatingLog()   │
├──────────────────────────┼─────────────────────┤
│ get_timed_rotating_log() │ TimedRotatingLog()  │
└──────────────────────────┴─────────────────────┘

New Features

  • Context manager support for automatic cleanup:
with TimedRotatingLog(name="myapp", directory="/logs") as logger:
    logger.info("This logger auto-cleans on exit")