{"id":23795,"library":"glog","title":"glog","description":"glog is a simple Google-style logging wrapper for Python, inspired by the C++ Google logging library. Version 0.3.1 is the latest on PyPI, though the project is in maintenance mode with no active development.","status":"maintenance","version":"0.3.1","language":"python","source_language":"en","source_url":"https://github.com/benley/python-glog","tags":["logging","google-style","wrapper"],"install":[{"cmd":"pip install glog","lang":"bash","label":"PyPI"}],"dependencies":[],"imports":[{"note":"","wrong":"","symbol":"glog","correct":"import glog"}],"quickstart":{"code":"import glog\n\nif __name__ == '__main__':\n    glog.info('This is an informational message')\n    glog.warn('This is a warning')\n    glog.error('This is an error')\n    try:\n        1/0\n    except ZeroDivisionError:\n        glog.exception('Caught an exception')","lang":"python","description":"Basic usage showing log levels and exception logging."},"warnings":[{"fix":"Replace `glog.warn(...)` with `glog.warning(...)`.","message":"glog uses `glog.warn()` which is deprecated; use `glog.warning()` as per Python logging conventions.","severity":"deprecated","affected_versions":"all"},{"fix":"Redirect stderr if needed, or configure logging to output elsewhere.","message":"glog outputs to stderr by default, not stdout. This can confuse users expecting console output.","severity":"gotcha","affected_versions":"all"},{"fix":"Use glog's internal configuration or consider another library if you need standard logging integration.","message":"glog uses its own formatting and does not respect Python's standard logging configuration. Changes via `logging.basicConfig` have no effect.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Set the environment variable GLOG_minloglevel (e.g., export GLOG_minloglevel=1) or use glog's internal logging level control.","cause":"glog does not expose a set_level function; levels are set via environment variable GLOG_minloglevel or flags.","error":"AttributeError: module 'glog' has no attribute 'set_level'"},{"fix":"Install with 'pip install glog'. Note: this is a Python-only package, not the C++ Google logging library.","cause":"glog is not installed or the package name is confused with google-glog (C++).","error":"ImportError: No module named glog"},{"fix":"Use glog.info('message'), glog.warning('message'), etc., instead of glog.log().","cause":"Calling glog.log() incorrectly; glog.log() requires at least a message argument.","error":"TypeError: log() missing 1 required positional argument: 'msg'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}