-
Notifications
You must be signed in to change notification settings - Fork 91
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
Provide a way to allow setting all logger level to debug #557
Conversation
bpf/include/bpf_log.h
Outdated
#define BPF_LOGTYPE_SOCKOPS BPF_LOG_LEVEL | ||
#define BPF_LOGTYPE_XDP BPF_LOG_LEVEL | ||
#define BPF_LOGTYPE_SENDMSG BPF_LOG_LEVEL | ||
#define BPF_LOGTYPE_PROBE BPF_LOG_LEVEL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are now useless until we support fine-grained log level control
Signed-off-by: Zhonghu Xu <xuzhonghu@huawei.com>
Signed-off-by: Zhonghu Xu <xuzhonghu@huawei.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
see 4 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
@nlgwcy Because of the instruction limit of ebpf, this is the most we can do now. Luckily with this, we can set log level to almost all the bpf prog, except |
@@ -101,7 +101,7 @@ static inline int map_lookup_log_level() | |||
int *value = NULL; | |||
value = kmesh_map_lookup_elem(&bpf_log_level, &zero); | |||
if (!value) | |||
return 0; | |||
return BPF_LOG_INFO; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a change, now no debug level log will be printed by default. Which can be tuned by user from kmesh-daemon.
bpf/kmesh/ads/include/kmesh_common.h
Outdated
#define BPF_LOGTYPE_FILTER BPF_DEBUG_ON | ||
#define BPF_LOGTYPE_CLUSTER BPF_DEBUG_ON | ||
#define BPF_LOGTYPE_ROUTER BPF_DEBUG_ON | ||
#define BPF_LOGTYPE_ROUTER_CONFIG BPF_DEBUG_ON | ||
#define BPF_LOGTYPE_COMMON BPF_DEBUG_OFF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will try
Signed-off-by: Zhonghu Xu <xuzhonghu@huawei.com>
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nlgwcy The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Fix: #547