qubes.log – Logging routines

Qubes logging routines

See also: qubes.vm.qubesvm.QubesVM.log

class qubes.log.DBusHandler(*args, **kwargs)[source]

Bases: logging.Handler

Handler which displays records as DBus notifications


Do whatever it takes to actually log the specified logging record.

This version is intended to be implemented by subclasses and so raises a NotImplementedError.

app_icons = {0: 'dialog-information', 30: 'dialog-warning', 40: 'dialog-error'}

mapping of loglevels to icons


Enable global logging

Use logging module from standard library to log messages.

>>> import qubes.log
>>> qubes.log.enable()          # doctest: +SKIP
>>> import logging
>>> logging.warning('Foobar')   # doctest: +SKIP

Enable debug logging

Enable more messages and additional info to message format.


Initialise logging for particular VM name

Parameters:vmname (str) – VM’s name
Return type:logging.Logger