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

[Bug] FAL头文件可能会污染ulog #9279

Open
kaidegit opened this issue Aug 7, 2024 · 3 comments
Open

[Bug] FAL头文件可能会污染ulog #9279

kaidegit opened this issue Aug 7, 2024 · 3 comments

Comments

@kaidegit
Copy link
Contributor

kaidegit commented Aug 7, 2024

RT-Thread Version

master

Hardware Type/Architectures

h750

Develop Toolchain

GCC

Describe the bug

引入或间接引入会导致log_d等api受到污染

在程序中定义LOG_TAG后引入ulog后再引入fal,或是先引入fal再定义LOG_TAG引入ulog,均会导致log_d等小写api使用FAL的log

image
image
image

Other additional context

No response

@wdfk-prog
Copy link
Contributor

调换一下顺序,这一块放到最后

#define LOG_TAG              "example"
#define LOG_LVL              LOG_LVL_DBG
#include <ulog.h>

@kaidegit
Copy link
Contributor Author

kaidegit commented Aug 7, 2024

唔似乎要求在包含fal之前的头文件都没有包含过ulog,否则最下面的包含ulog直接就被忽略了,也不是很友好。比如我这个

#include "spi_flash_sfud.h"
#include "flashdb.h"

就会导致还是ulog先引入,并且略难排查

@kaidegit kaidegit changed the title [Bug] FAL头文件可能会污染ulog的LOG_TAG [Bug] FAL头文件可能会污染ulog Aug 7, 2024
@BernardXiong
Copy link
Member

或者这类是否有好的解决办法,大家可以多想想

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

3 participants