Logger hooks
Overview
Hooks for logging service method execution and errors.
Functions
log(hook)
Usually used as an app-level hook.
Logs information about each hook execution:
- Error hooks: logs the error message and stack trace at
errorlevel. - All hooks (normal): logs
"{type}: {path} - Method: {method}"atdebuglevel. - Development mode only: logs full
hook.data,hook.params, andhook.resultatsillylevel.
TIP
The detailed silly-level logging is only active in NODE_ENV=development to avoid the CPU overhead of serializing large hook objects in production.