Skip to content

Conversation

@johnmaia
Copy link

@johnmaia johnmaia commented Jul 3, 2019

This PR fixes the debugnyan debug level option.

The current version always replaces the given level option by the default value and therefore does not allow to set a custom level.

@joaonice
Copy link

Hi! Any updates on this? Thank you.

@johnmaia johnmaia force-pushed the bugfix/custom-debug-level branch from bedb993 to eb850cc Compare May 29, 2020 16:02
@johnmaia
Copy link
Author

@waldyrious please take another look.

@Americas
Copy link
Contributor

Not being able to set the level property is on purpose, we do not want debugnyan to log messages unless debug has the namespace enabled.

If the issue is that the level is to low, why not raise it? Would 999 work?

@johnmaia johnmaia force-pushed the bugfix/custom-debug-level branch from eb850cc to 4f92d3d Compare May 29, 2020 17:57
@johnmaia
Copy link
Author

johnmaia commented May 29, 2020

We would wish to be able to configure the debug level depending on the environment where our applications are running.

Example:

On our development environment we would set the debug level to DEBUG to have more detailed logs and on our production environment we would set it to WARN to reduce the amount of logs.

However, with the current version of debugnyan we are simply unable configure the debug level which, to me, is a pretty obvious configuration option on a debugging tool.

@Americas
Copy link
Contributor

Americas commented Jun 1, 2020

Ok, then it seems to me the only thing you want is to configure the level set here https://github.com/uphold/debugnyan/pull/98/files#diff-168726dbe96b3ce427e7fedce31bb0bcL61.

Changing the level on the other two lines (when creating the logger instances) would have the undesired effect of outputting the log messages even when their namespaces were not enabled.

@satazor satazor mentioned this pull request Nov 18, 2023
@Americas
Copy link
Contributor

Fixed in #142

@Americas Americas closed this Nov 20, 2023
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

Successfully merging this pull request may close these issues.

4 participants