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

platform: Add HarmonyOS HiLog support #5562

Closed
wants to merge 1 commit into from

Conversation

quink-black
Copy link
Contributor

No description provided.

@github-actions github-actions bot added the core label Jul 3, 2024
Comment on lines +298 to +305
#ifndef LOG_DOMAIN
#define LOG_DOMAIN 0x6E68
#endif
#ifndef LOG_TAG
#define LOG_TAG "ncnn"
#endif
#include <hilog/log.h>
#define NCNN_LOGE(...) OH_LOG_ERROR(LOG_APP, ##__VA_ARGS__)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

int OH_LOG_Print(LOG_APP, LOG_WARN, LOG_DOMAIN, "ncnn", ##__VA_ARGS__)

domain could be hardcoded as any code you like here

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这样不行,如果外面调用了,比如下面这种写法
NCNN_LOGE("%d", 1),转成OH_LOG_ERROR(LOG_APP, "%d", 1),这个1是不会输出出来的,按鸿蒙的文档中要写成"%{public}d"这样才能输出出来

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants