diff --git a/README.md b/README.md index 1683148..0ab661a 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,7 @@ This gives you `--verbosity`, `--silent`, and `--logdev` options. ```python import logmuse + def main(): # ... parse args ... logger = logmuse.logger_via_cli(args, make_root=True) @@ -57,6 +58,7 @@ Imported packages don't need logmuse at all. Just use the standard `logging` mod ```python import logging + _LOGGER = logging.getLogger(__name__) ``` diff --git a/changelog.md b/changelog.md index 7acc5ec..b66ed89 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,11 @@ # Changelog +## [0.3.1] -- 2026-08-07 +### Changed +- Default (non-devmode) log message format now includes level, timestamp, and logger name: `[%(levelname)s] [%(asctime)s] [%(name)s] %(message)s` (was bare `%(message)s`). This is what downstream packages were reconfiguring by hand. +- Because the logger name is now included, downstream packages no longer need to hand-roll a per-package prefix (e.g. `[BEDBOSS]`, `[PEPDBAGENT]`) in their own format strings; `%(name)s` reports the actual originating logger, including submodules. +- Development mode (`--logdev`/`devmode=True`) and log file output formats are unchanged. + ## [0.3.0] -- 2026-03-05 ### Changed - Modernized packaging: pyproject.toml with hatchling, removed setup.py diff --git a/logmuse/logmuse.py b/logmuse/logmuse.py index de6202e..36307dc 100644 --- a/logmuse/logmuse.py +++ b/logmuse/logmuse.py @@ -21,7 +21,7 @@ ] -BASIC_LOGGING_FORMAT: str = "%(message)s" +BASIC_LOGGING_FORMAT: str = "[%(levelname)s] [%(asctime)s] [%(name)s] %(message)s" DEV_LOGGING_FMT: str = ( "%(levelname).4s %(asctime)s | %(name)s:%(module)s:%(lineno)d > %(message)s " ) diff --git a/pyproject.toml b/pyproject.toml index a738fcf..98bf92b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "logmuse" -version = "0.3.0" +version = "0.3.1" description = "Logging setup" readme = "README.md" license = "BSD-2-Clause"