skillfed

oslo.log

oslo.log library

oslo-log v8.3.0 1.0M downloads/30d#4,517 on PyPI
Permissive license Apache-2.0 Active released

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-log

uv

uv add oslo-log

poetry

poetry add oslo-log

Installing 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

Environment :: OpenStackIntended Audience :: Information TechnologyIntended Audience :: System AdministratorsOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonTyping :: Typed

Tags

openstack logging configurationstandardized log formattingcontext-aware logging libraryoslo logging setupapplication logging framework
openstacklogging-framework

More Application Frameworks packages