IO
logger
Used to send log messages to the Run log.
These are the docs for Trigger.dev v2 which will be deprecated on January 31st, 2025. You probably want the v3 docs.
There are 5 levels, that you can use to log messages.
From least to most important:
io.logger.debug()
- info for debugging purposesio.logger.info()
- informationio.logger.warn()
- warningsio.logger.error()
- errorsio.logger.log()
- essential messages
If you set the logLevel
on the Job or Client so only messages of a certain
level are logged, then io.logger
will ignore log messages of lower levels.
Parameters
Each of the io.logger
methods takes these params:
The log message.
An optional object with additional data to log.
Returns
A Promise
that resolves when the message has been logged.