Logger function
contracts/common.md#principled-implementation It stores the logger in TypedRoute, which owns the single logger both route families use.
contracts/common.md#clear-and-simple-design A one-line delegation, so the logger has one owner.
contracts/common.md#prohibited-implementation-shortcuts It changes only the logger variable.
Set the logger function for the response validation failure.
If you've configured the transformation option to
validate.login thetsconfig.jsonfile, then the error log information of the response validation failure would be logged through this function instead of throwing the 500 internal server error.By the way, be careful. If you've configured the response transformation option to be
validate.log, client may get wrong response data. Therefore, this way is not recommended in the common backend server case.