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

setLogger BUG #249

Closed
aiwhj opened this issue Nov 28, 2018 · 1 comment
Closed

setLogger BUG #249

aiwhj opened this issue Nov 28, 2018 · 1 comment

Comments

@aiwhj
Copy link
Member

aiwhj commented Nov 28, 2018

版本1.8.4
image
输出
image

aiwhj added a commit to aiwhj/SeasLog that referenced this issue Nov 28, 2018
@aiwhj
Copy link
Member Author

aiwhj commented Nov 28, 2018

判断是否需要重新设置 Logger 的时候使用的是 strncmp, 并且该函数第三个参数设置为 传入的 logger 的长度。当第二次设置为 aaa 的时候,此时 该函数的第三个参数 n 为3,导致只判断 lastLogger 中 aaaBBB 的前 3 个字符便终止比较,得出两个字符串相同的误判断。

aiwhj added a commit to aiwhj/SeasLog that referenced this issue Dec 4, 2018
Neeke added a commit that referenced this issue Dec 4, 2018
@Neeke Neeke closed this as completed in 18573d9 Dec 4, 2018
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

1 participant