glib-log-bridge 0.0.1

Creator: bradpython12

Last updated:

Add to Cart

Description:

gliblogbridge 0.0.1

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

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.