Logs
For logging we use logger
. We can use logs of type info
and error
.
- Typescript
logger.info('some log message', dto);
logger.error('some log message', dto);
Logs in Admin
Adding another parameter with value true
will save the log message to the database for display in the Admin.
- Typescript
logger.info('some log message', dto, true);
tip
Logs in Admin are mainly suitable for logging the business logic of processes. The log view in admin is not intended to supersede developer tools for reading logs.