Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to set loglevel verbosity #21

Closed
nphias opened this issue Jan 21, 2020 · 10 comments
Closed

how to set loglevel verbosity #21

nphias opened this issue Jan 21, 2020 · 10 comments

Comments

@nphias
Copy link

nphias commented Jan 21, 2020

using the latest version "@holochain/tryorama": "^0.3.2-dev.2"

in the readme file it says switching off logging is a config setting:
const commonConfig = Config.gen( { chat: Config.dna('path/to/chat.dna.json') }, { logger: Config.logger(false) } )

i get an error that the 'type' field is missing with this config
i imagine it should be something like {type:'error'} but that doesnt work for me either.

@maackle
Copy link
Collaborator

maackle commented Jan 21, 2020

Oops, it was a mistake to let that version get tagged as the latest version. Can you try it with 0.3.1?

@nphias
Copy link
Author

nphias commented Jan 21, 2020

same error

20:31:11 info:
★★★ [[[CONDUCTOR alice]]]
★ Error while trying to boot from config: IoError("Error loading configuration: missing field type for key logger")

20:31:11 [tryorama] info: conductor 'alice' exited with code 0
not ok 1 Conductor exited before starting interface (code 0)

@nphias nphias changed the title how set loglevel verbosity how to set loglevel verbosity Jan 21, 2020
@milkyklim
Copy link

Seems related.

If I set different verbosity level for logger, e.g. error or info, I get the same output. Using version "@holochain/tryorama": "^0.3.0".

@maackle
Copy link
Collaborator

maackle commented Jan 28, 2020

Hey @nphias, @milkyklim this was a simple bug of invalid config being generated, it should be fixed in 0.3.2-dev.3 which I just published.

@nphias
Copy link
Author

nphias commented Jan 28, 2020

oh nice.. will try it and close the issue if it works..
.. .One other thing on the wish list would be a config to filter out debug messages that are about the state of the conductor and network.... from debug messages that tell us zome interaction and testing..

@milkyklim
Copy link

Works on my side, thanks for the fix.

@nphias
Copy link
Author

nphias commented Jan 28, 2020

its not working for me ... @milkyklim can you paste your code?
i guess it should be something like

,{
    logger: Config.logger({level:"error"})
   }

@milkyklim
Copy link

const config = Config.gen(
  {
   hello_holo: dna,
  },
  {
    logger: Config.logger(false),
  },
);

@milkyklim
Copy link

milkyklim commented Jan 28, 2020

@nphias dictionary key is type, not level.

If I change your code it works on my side.

@nphias
Copy link
Author

nphias commented Jan 28, 2020

ok got it working.. i understand ... it moderates logging that the core spits out not test logs

const mainConfig = Config.gen({
    logger: Config.logger({type:"error"})
  })

or to just turn off all:

const mainConfig = Config.gen({
    logger: Config.logger(false)
  })

@nphias nphias closed this as completed Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants