Logger function now made an interface