Bridge Python and GLib logging facilities
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
glib-log-bridge-0.0.1.tar.gz
(10.7 kB
view hashes)
Built Distribution
Close
Hashes for glib_log_bridge-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4c88b7c4875c6475a2dd84eb717c51761f9d212f41e11926db3fbcbd5817a15 |
|
MD5 | 26aacfff52eb4bfca8ea1b6ce35e61a0 |
|
BLAKE2b-256 | 4a9e62b1c388b8fbf3529742558fd5dc58a80883e520ffc75e8f8ce97d778a72 |