logger is optional