oslo.log
oslo.log library
What it is and what it does
oslo.log is a standardized logging library built for OpenStack projects. It wraps Python's standard logging module with OpenStack-specific conventions, providing pre-built formatters, handlers, and configuration patterns so that all OpenStack services log consistently. The library also adds context-aware logging—the ability to attach and track request-scoped metadata like resource IDs through log records automatically.
You use it by calling setup() with your application's config object, then logging normally through the standard Python logging API. The library handles the rest: configuration parsing, formatter application, and context propagation. It depends on other oslo libraries (oslo.config, oslo.context, oslo.utils, oslo.serialization, oslo.i18n) and python-dateutil for timestamp handling, so it's most useful in environments already using the oslo ecosystem.
Use it for:
- Standardize logging across multiple OpenStack service components to ensure consistent log format and behavior.
- Track request context (tenant ID, user ID, resource ID) automatically through log records without manual threading.
- Configure logging behavior (log levels, handlers, formatters) through oslo.config files shared across OpenStack deployments.
- Integrate custom formatters and handlers specific to OpenStack operational requirements without reimplementing them per service.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
oslo.log provides standardized logging configuration and custom formatters for OpenStack projects, with support for context-specific logging like resource IDs.
Yes, if you are building or extending an OpenStack service or application that already uses oslo libraries. The standardized configuration and context-aware logging are valuable in multi-service deployments. No, if you are building standalone applications outside the OpenStack ecosystem—standard Python logging or a general-purpose library like structlog would be simpler. The dependency on 8 oslo packages makes it a commitment to that ecosystem.
Install
oslo-log on PyPI
pip
pip install oslo-loguv
uv add oslo-logpoetry
poetry add oslo-logInstalling oslo.log
Before you install
Low install friction with a pure-Python wheel. Active maintenance with a release 35 days ago. Depends on 8 runtime packages including oslo.config, oslo.context, and oslo.utils, all part of the same OpenStack library ecosystem.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions, typical for OpenStack projects.
Quickstart
pip install oslo.log
from oslo import log
log.setup(conf, 'myapp')
Requires Python 3.11 or later.
Verify before relying
- Whether context-specific logging features (e.g., resource ID tracking) work out-of-the-box or require additional setup beyond the basic API.
- Performance characteristics when handling high-volume logging in production OpenStack deployments.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 8 — pbr, oslo.config, oslo.context, oslo.i18n, oslo.utils, oslo.serialization, python-dateutil, debtcollector |
| Maintenance | actively maintained — 35 days since the last release |
| First released | |
| Downloads | 1,009,003/month — #4,517 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: oslo_log-8.3.0-py3-none-any.whl
Tags
More Application Frameworks packages
FastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
textualTextual is a Python framework for building…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
mcpBuild and connect to Model Context Protocol…
permissive · top 1,000 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
oslo.cacheoslo.cache wraps dogpile.cache to provide a…
permissive · top 15,000 on PyPI
oslo.configParses command-line arguments and .ini-style…
permissive · top 5,000 on PyPI
oslo.metricsCollects and exposes metrics data from Oslo…
permissive · top 15,000 on PyPI
pbrPBR injects sensible defaults into setuptools…
permissive · top 1,000 on PyPI
oslo.reportsoslo.reports generates structured debug reports…
permissive · top 15,000 on PyPI
oslo.utilsoslo.utils provides common utility functions…
permissive · top 5,000 on PyPI
oslotestoslotest provides a testing framework with…
permissive · top 15,000 on PyPI
oslo.vmwareoslo.vmware provides a library for common…
permissive · top 15,000 on PyPI
oslo.upgradecheckProvides a framework for writing and running…
permissive · top 15,000 on PyPI
oslo.dboslo.db provides database connectivity and ORM…
permissive · top 15,000 on PyPI