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

Can't set loglevel of subsystems properly #150

Open
RobQuistNL opened this issue Mar 18, 2025 · 1 comment
Open

Can't set loglevel of subsystems properly #150

RobQuistNL opened this issue Mar 18, 2025 · 1 comment
Labels
need/triage Needs initial labeling and prioritization

Comments

@RobQuistNL
Copy link

I have a package that has a lot of subpackages. The loggers get initialized like this for each package;

var log = log2.Logger("hwdata:cli")
var log = log2.Logger("hwdata:system")
var log = log2.Logger("hwdata:cpu")

When I include this project into another project, I want to set all the loglevels of this subsystem to info;

GOLOG_LOG_LEVEL="debug,hwdata=info" go run .

This doesn't work. It still shows hwdata:cpu with level debug.
Then I tried the "regex" setup that was described in the readme.md;

GOLOG_LOG_LEVEL="debug,hwdata:.*=info" go run .

This also doesn't work

I now have to write it like this;

GOLOG_LOG_LEVEL="debug,hwdata:cpu=info,hwdata:system=info,hwdata:cli=info" go run .

which is kind of ineffective, especially since I have about 20 of those subsystems. Shouldn't this just work on a subsystem level basis? Or is the ":" that is mentioned in the readme just arbitrary and doesn't it work with subsystems like that at all?

@RobQuistNL RobQuistNL added the need/triage Needs initial labeling and prioritization label Mar 18, 2025
Copy link

welcome bot commented Mar 18, 2025

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment.
Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

  • "Priority" labels will show how urgent this is for the team.
  • "Status" labels will show if this is ready to be worked on, blocked, or in progress.
  • "Need" labels will indicate if additional input or analysis is required.

Finally, remember to use https://discuss.ipfs.io if you just need general support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/triage Needs initial labeling and prioritization
Projects
None yet
Development

No branches or pull requests

1 participant