glog
Simple Google-style logging wrapper for Python.
What it is and what it does
glog is a thin wrapper around Python's standard logging module that applies Google's internal logging conventions without requiring boilerplate configuration. It configures the root logger to output all messages to stderr in a consistent format: a log-level prefix, timestamp with microseconds, process ID, source filename and line number, and the message body. If your application already uses gflags, glog automatically adds a --verbosity flag; otherwise you can call log.setLevel() directly.
Beyond basic logging, glog provides check functions (check_eq, check_ge, check_lt, and others) that enforce invariants and raise FailedCheckException with detailed context when they fail, similar to C++ glog's assertion macros. This makes it useful for mixed Python/C++ codebases or when you prefer explicit runtime checks over standard Python asserts.
Use it for:
- Standardize logging format across multiple Python scripts and modules without per-module configuration
- Enforce runtime invariants using check functions (check_eq, check_ge, etc.) with automatic stack traces on failure
- Integrate logging into applications that already depend on gflags for command-line argument handling
- Port logging patterns from C++ glog to Python while maintaining similar output format and behavior
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A simplified Google-style logging wrapper that configures Python's standard logger to output consistently formatted messages to stderr with minimal setup.
No. The package is abandoned (last release 2016-12-14, last commit 2022-11-07) with no maintenance or security updates. While it has low install friction and a permissive license, its age and lack of active development make it a poor choice for new projects. Consider actively maintained alternatives like the standard logging module or structured logging libraries instead.
Install
glog on PyPI
pip
pip install gloguv
uv add glogpoetry
poetry add glogInstalling glog
Before you install
Low install friction with only two lightweight runtime dependencies (python-gflags and six). However, the package is abandoned—last release was 2016-12-14 and last commit 2022-11-07—so expect no maintenance or security updates.
License in practice
BSD license is permissive, allowing commercial and private use with minimal restrictions. You may use and modify the code freely as long as you retain the license notice.
Quickstart
pip install glog
import glog as log
log.setLevel("INFO")
log.info("It works.")
log.warn("Something not ideal")
log.error("Something went wrong")
Verify before relying
- Whether python-gflags and six remain actively maintained and compatible with modern Python versions
- Whether the abandoned status and lack of updates since 2016 pose compatibility issues with current Python releases
Package facts
| License | BSD (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — python-gflags, six |
| Maintenance | abandoned — 3,530 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 104,740/month — #12,738 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: glog-0.3.1-py2.py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
loggingProvides a standard error logging mechanism for…
unclear · top 15,000 on PyPI
vmoduleAdds glog-style verbose logging levels to…
permissive · top 15,000 on PyPI
logistrologistro wraps Python's standard logging module…
permissive · top 5,000 on PyPI
minilogMinilog wraps Python's standard logging module…
permissive · top 15,000 on PyPI
logmuseAdds standard CLI logging options…
permissive · top 15,000 on PyPI
loguruLoguru provides a pre-configured logger that…
permissive · top 1,000 on PyPI
verboselogsAdds four custom logging levels (NOTICE, SPAM,…
permissive · top 15,000 on PyPI
rapids-loggerrapids-logger provides a CMake-based framework…
permissive · top 15,000 on PyPI
python-gflagsParses command-line flags and arguments for…
permissive · top 15,000 on PyPI
loggerA Python logging helper that provides utilities…
unclear · top 15,000 on PyPI