logging abstraction and keypress testing