logger: refactor code, add dbus.SetAutoDestroyHandler()