add arguments for logging and register.