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

修复全局变量初始化顺序问题 #699

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xb1520
Copy link

@xb1520 xb1520 commented Nov 28, 2023

就是main函数之前的默认日志等级不明确的问题。是不同编译单元之间的全局变量初始化顺序不明确导致的
第一次提交pr,不太会用,我把示例演示放到了下面的链接里
commit

自己的全局变量可能先于日志模块的g_logLevel先初始化,这个时候使用日志模块的时候默认的等级是没有效果的
例:当把EventLoop声明为全局变量时,他的构造函数里会调用LOG_DEBUG,默认的日志等级是INFO,但是默认等级并没有生效
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.

1 participant