added NullLogger if no logger was given