modified logger allowing the user to set a custom one