Logger
ALogger interface is injected into the handler context with ctx.log. It is bound to the namespace sqd:processor:mapping. The context logger is a recommended way of logging for squid processors.
Logger exposes the following logging levels, in order of increasing severity:
TRACEDEBUGINFOWARNERRORFATAL
INFO.
And here is an example:
Overriding the log level
The log level can be overridden by setting a matching namespace selector to one of theSQD_TRACE, …, SQD_FATAL env variables. In particular, to set the handler logs level to DEBUG set the environment variable SQD_DEBUG to sqd:processor:mapping:
@subsquid/evm-processor with
sqd:processor.
Accessing logs of a deployed Squid
Processor logs can be inspected once the squid is deployed to Cloud:infowarningdebugerror- will fetch messages emitted byctx.log.errorctx.log.fatalctx.log.trace
sqd logs --help for a full list of log options supported by SQD Cloud.
