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

Add SetPrintLevel to support changing print level of libbpf messages #271

Closed
wants to merge 5 commits into from

Conversation

mozillazg
Copy link
Contributor

Closes #6

Depend on #270

@rafaeldtinoco rafaeldtinoco added this to the next-feature-milestone milestone Dec 12, 2022
@mozillazg mozillazg marked this pull request as ready for review December 13, 2022 01:25
@mozillazg
Copy link
Contributor Author

Ready for review.

A demo for this function: mozillazg#6

$ sudo ./main-static
libbpf: loading main.bpf.o
libbpf: elf: section(3) license, size 13, link 0, flags 3, type=1
libbpf: license of main.bpf.o is Dual BSD/GPL
libbpf: elf: section(4) .maps, size 32, link 0, flags 3, type=1
libbpf: elf: section(9) .BTF, size 470, link 0, flags 0, type=1
libbpf: elf: section(13) .symtab, size 168, link 1, flags 0, type=2
libbpf: looking for externs among 7 symbols...
libbpf: collected 0 externs total
libbpf: map 'numbers': at sec_idx 4, offset 0.
libbpf: map 'numbers': found type = 1.
libbpf: map 'numbers': found key [8], sz = 4.
libbpf: map 'numbers': found value [8], sz = 4.
libbpf: map 'numbers': found max_entries = 5.
libbpf: map 'numbers': created successfully, fd=8

@geyslan
Copy link
Member

geyslan commented Jan 31, 2023

@mozillazg Thanks for this PR and sorry for the delay in getting to it.

This seems awesome, but as we've considered to publicise an interface to callbacks, perhaps this has become old for analysis. Would you mind of reviewing #284. Then, if you agree, I would close this.

@geyslan
Copy link
Member

geyslan commented Jan 31, 2023

Then, if you agree, I would close this.

Or, if you do prefer, you can tackle SetPrintLevel on top of #284 or wait it get into and rebase this.

@mozillazg mozillazg closed this Feb 1, 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.

Print debug messages if debug flag was chosen
3 participants