logger: refactor code follow golint's advice
grub2ext: refactor code to follow golint advice