Registry / observability / logmuse

logmuse

JSON →
library0.3.0pypypi✓ verified 83d ago

Logmuse is a lightweight Python library designed to simplify the setup of basic logging for applications. It provides utilities to configure named loggers, set log levels, and integrate logging options with `argparse`. The current version is 0.3.0, and it maintains a relatively stable release cadence with minor updates.

pip install logmuse
INSTALL
IMPORT
SIG · LOGMUSE
L
logmuse
observabilitypythonv0.3.0
Install
1.6s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.3.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.8MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 1.6s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

setup_logger
from logmuse import setup_logger
from logmuse import setup_logging

This quickstart demonstrates how to initialize a named logger using `setup_logging` and emit various log messages. Remember to call `setup_logging` before your logger instance (`_LOGGER`) starts emitting messages to ensure handlers are configured.

import logging from logmuse import setup_logging # Get a logger instance for your application _LOGGER = logging.getLogger("my_app") def main(): # Setup logging to console at INFO level for 'my_app' # Set 'level="DEBUG"' to see more detailed messages setup_logging(name="my_app", level="INFO") _LOGGER.info("Application started successfully!") _LOGGER.debug("This debug message will not be shown by default with INFO level.") _LOGGER.warning("This is a warning message.") _LOGGER.error("An error occurred, but the app continues.") if __name__ == "__main__": main()
Debug
Known issues
gotchaCalling `setup_logging` multiple times for the same logger name (or without a name, affecting the root logger) can overwrite previous configurations or add duplicate handlers.
fix
Ensure `setup_logging` is called only once per logger name during application initialization. If you need to change logging levels dynamically, use `logging.getLogger(name).setLevel()` directly.
affects: All versions
gotchaThe default logging level set by `logmuse.setup_logging` might not be `DEBUG`. If you're not seeing expected log messages, the level might be set too high.
fix
Always explicitly specify the desired logging level, e.g., `setup_logging(name='my_app', level='DEBUG')` to ensure all messages are captured.
affects: All versions
gotchaInteraction with `logging.basicConfig()`: If `logging.basicConfig()` has been called elsewhere in your application (e.g., by another library or implicitly), `logmuse.setup_logging` might not behave as expected or could lead to duplicate log messages.
fix
It's best practice to use a single, consistent approach for logging configuration. Ensure `logmuse.setup_logging` is your primary method, and avoid calling `logging.basicConfig()` if `logmuse` is handling your setup.
affects: All versions
Upgrade
Version history
0.3.0latest on PyPI · released Mar 6, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
14 hits · last 30 days
node
12
OpenAI (training)
2
Resources
logmuse — pip install logmuse · libregistry