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

feat: Add --verbose flag #691

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

carlosm27
Copy link
Contributor

Description
This PR add the --verbose flag and add the log level Info APP to hide the logging messages from Actix.
image

With the --verbose flag:
image

This PR fixes #611

Copy link

vercel bot commented Nov 11, 2023

@carlosm27 is attempting to deploy a commit to the sparckles Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

codspeed-hq bot commented Nov 11, 2023

CodSpeed Performance Report

Merging #691 will improve performances by 11.55%

Comparing carlosm27:log_level (c76eb68) with main (cf1de4f)

Summary

⚡ 1 improvements
✅ 105 untouched benchmarks

Benchmarks breakdown

Benchmark main carlosm27:log_level Change
test_lifecycle_handlers 967.1 µs 867 µs +11.55%

Comment on lines +36 to +48
INFO_APP = 55 # Level number, higher than CRITICAL (50)
logging.addLevelName(INFO_APP, "INFO_APP") # Add level name


def info_app(self, message, *args, **kwargs):
self._log(INFO_APP, message, args, kwargs)


logging.Logger.info_app = info_app # Add method to Logger class

logging.INFO_APP = INFO_APP # Optional - for convenience

logger = logging.getLogger(__name__)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @carlosm27 👋

Thank you for the PR 😄 Can you please explain what the INFO_APP parameter does?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @sansyrox it creates a new log level because with the info level shows also the logs from Actix too. But, I just notice in the Logger documentation that it doesn't advice creating new logs levels because it can create conflicts with other libraries. So, I will continue working on this and making updates to receive their review.

Copy link
Contributor

@shivaylamba shivaylamba Feb 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @carlosm27 any further updates to this? Let us know if you are stuck on the issue

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.

fix log level!
3 participants