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

Only enable libbpf debug log if --debug is passed #216

Merged
merged 1 commit into from
Jun 30, 2023
Merged

Conversation

bobrik
Copy link
Contributor

@bobrik bobrik commented Jun 29, 2023

Logger callbacks were added by libbpfgo: aquasecurity/libbpfgo#284. This triggered debug output from libbpf on ebpf_exporter's startup, which is not desirable. This PR makes debug logs only appear if debug is enabled.

We also pass libbpf logs through log package to add timestamps and write to stderr to match the rest of the logs.

@bobrik bobrik merged commit 1c78990 into master Jun 30, 2023
6 checks passed
@bobrik bobrik deleted the ivan/log-callbacks branch June 30, 2023 03:16
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.

None yet

1 participant