Allow to override loging function.