grub2: fix logger code when register dbus interface failed