diff options
author | Papoteur <papoteur@mageia.org> | 2023-07-04 18:53:13 +0200 |
---|---|---|
committer | Papoteur <papoteur@mageia.org> | 2023-07-04 18:53:13 +0200 |
commit | af7af8bc28fb73f462e3fb2938c89c296e41e697 (patch) | |
tree | a45284f88ae7caca0adc5a29b5a29aeb83e91da0 /backend/magiback | |
parent | 709808e85e562675f3737211ffbbb84c59b80b98 (diff) | |
download | isodumper-af7af8bc28fb73f462e3fb2938c89c296e41e697.tar isodumper-af7af8bc28fb73f462e3fb2938c89c296e41e697.tar.gz isodumper-af7af8bc28fb73f462e3fb2938c89c296e41e697.tar.bz2 isodumper-af7af8bc28fb73f462e3fb2938c89c296e41e697.tar.xz isodumper-af7af8bc28fb73f462e3fb2938c89c296e41e697.zip |
Logging only in /var/log/magiback
Diffstat (limited to 'backend/magiback')
-rwxr-xr-x | backend/magiback | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/backend/magiback b/backend/magiback index e16e1dc..d46ee9a 100755 --- a/backend/magiback +++ b/backend/magiback @@ -222,11 +222,46 @@ class ConfFile(object): return True +class Logging(object): + """ + <node> + <interface name='org.mageia.Magiback.Logging'> + <method name='debug'> + <arg type='s' name='message' direction='in'/> + </method> + <method name='info'> + <arg type='s' name='message' direction='in'/> + </method> + <method name='warning'> + <arg type='s' name='message' direction='in'/> + </method> + <method name='error'> + <arg type='s' name='message' direction='in'/> + </method> + </interface> + </node> + """ + def __init__(self): + super().__init__() + + def debug(self, message): + logging.debug(message) + + def info(self, message): + logging.info(message) + + def warning(self, message): + logging.warning(message) + + def error(self, message): + logging.error(message) + if __name__ == '__main__': print("Running Magiback service.") bus = SystemBus() conf_file = ConfFile() - bus.publish(DEAMON_ORG, conf_file, ("Isodumper", Isodumper())) + log = Logging() + bus.publish(DEAMON_ORG, conf_file, ("Isodumper", Isodumper()), ('Logging', Logging())) loop = GLib.MainLoop() loop.run() logging.shutdown() |