Make logger a game component, use an object instead of global functions