Setting alogger is optional and allows for NULL values.