In SubQuery, you can log messages on 3 different levels. They are:
logger.info("info") logger.debug("debug") logger.warn("warning")
For example, adding “logger.info(“info test”)
The same can be done with warnings. However, to add a debug log, an extra modification needs to be made. The docker-compose.yaml file needs to have an additional –log-level=debug command passed to it.
command: - --log-level=debug
Here is a screenshot of the docker-compose.yaml file from the Hello World starter project.
Also don’t forget to regenerate and build the code first via:
yarn codegen yarn build
and then running: