adding a bit more logic to the logging framework