eunomia-bpf / bpftime

Userspace eBPF runtime for fast Uprobe & Syscall hook & Extensions with LLVM JIT
https://eunomia.dev/bpftime/
MIT License
699 stars 70 forks source link

[BUG] Cannot control log level in `bpftime attach` at least #179

Open agentzh opened 6 months ago

agentzh commented 6 months ago

I tried to use the system environment variable to control the log level of bpftime but it won't work, at least for the bpftime attach command:

$ SPDLOG_LEVEL=Error bpftime attach `pgrep victim`
[2024-01-27 15:11:15.313] [info] Injecting to 622200
[2024-01-27 15:11:15.322] [info] Successfully injected. ID: 1
Officeyutong commented 6 months ago

In the current design, you should control the log level of the attached process at the process side, since the library was injected into process, so environment variables were read at the process side.

yunwei37 commented 5 months ago

Maybe we should have the log level config in the shared memory, so it's globally available.