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_log_key_value参数k_len、v_len传反了 #1

Closed
tedli opened this issue Aug 31, 2016 · 2 comments
Closed

add_log_key_value参数k_len、v_len传反了 #1

tedli opened this issue Aug 31, 2016 · 2 comments

Comments

@tedli
Copy link

tedli commented Aug 31, 2016

void add_log_key_value(log_group_builder* bder,char* k,size_t v_len,char* v,size_t k_len)
log_builder.c 85 行
k用的是v_len
v用的是k_len
另外用CMakeList.txt做build有问题,build不通。
还有日志服务说有Go的API,没找到,现在用cgo调的C API,希望提供Go的。

@tedli tedli changed the title add_log_key_value参数k_len、v_len用传反了 add_log_key_value参数k_len、v_len传反了 Aug 31, 2016
@wangjwchn
Copy link
Contributor

@tedli
已经更正,
谢谢您的反馈。

@tedli
Copy link
Author

tedli commented Sep 1, 2016

log_builder.h68行extern void add_log_key_value(log_group_builder* bder,char* v,size_t v_len,char* k,size_t k_len);
log_builder.c84行void add_log_key_value(log_group_builder* bder,char* k,size_t v_len,char* v,size_t k_len)
头文件里定义的是v在前,k在后。这倒是不影响什么,问题是.c实现里,k用的是v_lenv用的是k_len
实际应用时,value大部分是比key长的,你测试代码打几条key短value长的,而且长度差大一点的,就能看出来value都被截了。

@tedli tedli closed this as completed Sep 5, 2016
leeyiw added a commit that referenced this issue Oct 31, 2016
fix gcc 4.8.5 compile error
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

No branches or pull requests

2 participants