nango.log().
Use custom logs for information that helps you understand function behavior: selected filters, page counts, checkpoint values, provider identifiers, branch decisions, and recoverable errors.
Add custom logs
nango.log() uses info.
Log levels
Nango supports these levels, from most to least verbose:
Only logs at or above the configured logger level are ingested into the Nango UI Logs tab.
For example, when the logger level is
warn, only warn and error custom logs are visible in the cloud logs.
Cloud vs local behavior
This means
await nango.log('message') is visible during local dry runs, because local dry runs default to debug. The same call defaults to info, so it is not visible in cloud logs unless you lower the configured logger level to info or debug.
Configure the logger
Set the default logger level for an environment withNANGO_LOGGER_LEVEL in Environment Settings > Environment Variables:
debug, info, warn, error, and off.
You can also change the logger level inside a function. This applies to nango.log() calls after the setting is changed:
What to log
Good function logs are specific and bounded:- Log the connection-specific configuration that changes behavior, such as selected folder IDs, regions, or pipeline IDs.
- Log provider pagination progress with counts, cursors, or checkpoints, but avoid logging every record.
- Log warnings when the provider omits optional data or returns a shape you can recover from.
- Log errors when you catch an exception and continue, so the run is still inspectable.