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

Make PANDA startup quieter #1350

Merged
merged 1 commit into from
Sep 11, 2023
Merged

Make PANDA startup quieter #1350

merged 1 commit into from
Sep 11, 2023

Conversation

lacraig2
Copy link
Member

This PR changes callbacks.c to use the LOG_* format (LOG_ERROR, LOG_WARNING, etc).

It also makes PANDA somewhat quieter by default with LOG formats that won't necessarily be seen for most items if PANDA's debug mode isn't set quite low.

Copy link
Contributor

@AndrewFasano AndrewFasano left a comment

Choose a reason for hiding this comment

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

So long as LOG_ERROR shows up by default (or maybe just always? Would be awkward to not print some of those errors) this looks great to me.

@lacraig2
Copy link
Member Author

Yes. The default log level does show LOG_ERROR

@lacraig2 lacraig2 linked an issue Sep 11, 2023 that may be closed by this pull request
@AndrewFasano AndrewFasano merged commit f102126 into dev Sep 11, 2023
26 checks passed
@AndrewFasano AndrewFasano deleted the quiet_panda branch September 11, 2023 13:31
@AndrewFasano
Copy link
Contributor

@lacraig2 do you think we could silence more of these, either by reducing log level or changing what we log with pypanda?

I'm looking to silence this output from pypanda where I load syscalls2 and OSI

PANDA[core]:os_familyno=2 bits=32 os_details=generic
PANDA[syscalls2]:using profile for linux arm
PANDA[osi_linux]:W> failed to read task.switch_task_hook_addr
PANDA[osi_linux]:W> kernelinfo bytes [20-23] not read

@lacraig2
Copy link
Member Author

lacraig2 commented Apr 3, 2024

@AndrewFasano are you looking for a way to silence these generally or in a specific use case?

If you're willing to accept the latter we might consider building out an API around the LOG_[LEVEL]_FILE macros that let those be set dynamically and directed to a file.

#if !defined(PANDA_ERROR_FILE)

@AndrewFasano
Copy link
Contributor

I think I'd like to either
A) Modify this code so it's not logging for my specific use case, or
B) Make it more configurable

These logs aren't really important warnings so I'm not too opposed to option A - I think all 4 of these messages could be logged at the debug level

@lacraig2
Copy link
Member Author

lacraig2 commented Apr 3, 2024

I think that 3 of 4 of those messages could be debug level.

The one that perhaps shouldn't be is:

PANDA[osi_linux]:W> failed to read task.switch_task_hook_addr

I could see a case for the optional fields (like this one) being at the debug level.

I do think B makes sense in general.

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.

PyPANDA startup is too verbose
2 participants