Skip to main content

Python ↔ GLib logger bridge

This library allows you to redirect either from the python logger facility to the glib logging facility, or the other way around.

NOTE: THIS IS STILL IN DEVELOPMENT! IT MIGHT NOT WORK CORRECTLY, AND THE INTERFACE CAN CHANGE!

Quick Usage

GLib → Python

from gi.repository import GLib
import glib_log_bridge.glib2python as glib2python
g2plog = glib2python.GLibToPythonLogger()
GLib.log_set_writer_func(g2plog.glibToPythonLogWriterFunc, None)

Python → GLib

import logging
import glib_log_bridge.python2glib as python2glib
handler = python2glib.PythonToGLibLoggerHandler()
logging.getLogger().addHandler(handler)
# Logger to apply, logger.getLogger() does it for all messages

Metadata

Release files for glib-log-bridge 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for glib-log-bridge 0.0.1
File Size Uploaded
glib-log-bridge-0.0.1.tar.gz 10.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for glib-log-bridge 0.0.1
File Interpreter ABI Platform
glib_log_bridge-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 23.5 kB

Release files / glib-log-bridge-0.0.1.tar.gz

Download URL glib-log-bridge-0.0.1.tar.gz
Size 10.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1e9847ade671cdbcd90be610d633d9b2c0dd28980ef1e288482b2cc28b220a3f
BLAKE2b-256 checksum
How to use checksums
dbe79ed6f3b8ed21c0f2767851e9f2dc3ee7bee62aa73350d7a323b5819d4a0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5

Release files / glib_log_bridge-0.0.1-py3-none-any.whl

Download URL glib_log_bridge-0.0.1-py3-none-any.whl
Size 12.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b4c88b7c4875c6475a2dd84eb717c51761f9d212f41e11926db3fbcbd5817a15
BLAKE2b-256 checksum
How to use checksums
4a9e62b1c388b8fbf3529742558fd5dc58a80883e520ffc75e8f8ce97d778a72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page