skillfed

glog

Simple Google-style logging wrapper for Python.

glog v0.3.1 104.7K downloads/30d#12,738 on PyPI53
Permissive license BSD Abandoned released

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 glog

uv

uv add glog

poetry

poetry add glog

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseProgramming Language :: PythonTopic :: Software Development :: Libraries :: Python ModulesTopic :: System :: Logging

Tags

google style logging pythonsimple logging wrapperglog pythonstderr logging formatterconsistent log formatminimal logging setupgoogle-style log prefix
abandonedlegacy-logging

More Python Modules packages