Holochain Forum

Node logging in Tryorama

I am trying to debug my holochain code running it in Tryorama. I do not see any output of my log commands in the flood of Tryorama messages. What is the correct way of doing it? I tried to use simplelog, logging either to file or to stdout, without success.

Hi akoros, I was having the same problem.

If you look in the tryorama github you see an environment variable called TRYORAMA_LOG_LEVEL can be used to set the log level and that it takes the following values:

error, warn, info, verbose, debug, or silly

(see https://github.com/holochain/tryorama/blob/master/src/env.ts and https://github.com/holochain/tryorama/blob/master/src/logger.ts)

I quite like using the npm package dotenv, so I created a .env file in the dna folder containing


installed the dotenv package, and added


to the test index.js. I’m not sure if this is the “correct” way of doing it (I’m new to developing on holochain) but it seems to have worked.