added new logger formatter based on an example from StackOverflow