Tryorama debug/info output making it impossible to review tests

Any way to suppress the noisy debug output?

I’m currently dumping the output to a file using nohup hc test > test.log just to find the test results.


Yes, provide logger: Config.logger({ type: "error" }) to the config but ensure you are on the right tryorama version @holochain/tryorama": "^0.3.2-dev.3 (most recent one).


UPD: supported types:

const levels = { 
  error: 0,
  warn: 1,
  info: 2,
  http: 3,
  verbose: 4,
  debug: 5,
  silly: 6

Brilliant! Thanks for this

1 Like

I tried this for my config and it doesn’t seem to work, still spits out all levels.

const mainConfig = Config.gen(
    into_pieces: dnaFile 
    logger: Config.logger({ type: "error" })
1 Like

Did you set correct tryorama version? Should be @holochain/tryorama": "^0.3.2-dev.3 in package.json in test folder.

It’s installed, the logger stuff is definitely there in the tryorama node_modules folder. I’m still getting the full debug output

It even comes up in the conductor output:

☉☉☉ [[[CONDUCTOR alice]]]
☉ conductor: ...ui_bundles: [], ui_interfaces: [], logger: LoggerConfiguration { logger_level: "error", rules: LogRules { rules: [LogRu...

I also followed these instructions but still see verbose logging output.

1 Like

Do you get less output at least? Or does it stay absolutely the same?

If you think that something is wrong, it might be a good idea to re-open this issue.

No, it’s still extremely verbose.

For a small test, I have ~1310 lines of output without Config.logger({ type: "error" }), and ~330 lines with.
That’s better ! :slight_smile: But verbose anyway, and there is still a lot of debug logs from tryorama.

1 Like

Okay it now seems to be working with "@holochain/tryorama": "^0.3.0-rc.3",

That was already a huge step forward for me :smiley:

I couldn’t get any of the above to work, but I’ve posted another work around here.

Config.logger({ type: "error" }) doesn’t do much for me.
I looked into tryorama code and you actually need to set the TRYORAMA_LOG_LEVEL environment variable.
I had to do this before calling my test:

1 Like