mirror of
https://gitee.com/openharmony/filemanagement_storage_service
synced 2024-11-27 01:01:16 +00:00
将日志添加到内核日志
Signed-off-by: fangzhiyi18 <fangzhiyi1@huawei.com>
This commit is contained in:
parent
1978f227cd
commit
ba56c5de56
@ -19,10 +19,19 @@
|
||||
|
||||
namespace OHOS {
|
||||
static constexpr OHOS::HiviewDFX::HiLogLabel LOG_LABEL = { LOG_CORE, LOG_DOMAIN, STORAGE_LOG_TAG};
|
||||
static constexpr OHOS::HiviewDFX::HiLogLabel KLOG_LABEL = { LOG_KMSG, LOG_DOMAIN, STORAGE_LOG_TAG};
|
||||
|
||||
#if defined KMSG_LOG
|
||||
#define PRINT_LOG(Level, fmt, ...) \
|
||||
OHOS::HiviewDFX::HiLog::Level(OHOS::LOG_LABEL, "[%{public}s:%{public}d] " fmt, \
|
||||
__FUNCTION__, __LINE__, ##__VA_ARGS__); \
|
||||
OHOS::HiviewDFX::HiLog::Level(OHOS::KLOG_LABEL, "[%{public}s:%{public}d] " fmt, \
|
||||
__FUNCTION__, __LINE__, ##__VA_ARGS__)
|
||||
#else
|
||||
#define PRINT_LOG(Level, fmt, ...) \
|
||||
OHOS::HiviewDFX::HiLog::Level(OHOS::LOG_LABEL, "[%{public}s:%{public}d] " fmt, \
|
||||
__FUNCTION__, __LINE__, ##__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#define LOGD(fmt, ...) PRINT_LOG(Debug, fmt, ##__VA_ARGS__)
|
||||
#define LOGI(fmt, ...) PRINT_LOG(Info, fmt, ##__VA_ARGS__)
|
||||
|
@ -72,6 +72,7 @@ ohos_executable("storage_daemon") {
|
||||
defines = [
|
||||
"STORAGE_LOG_TAG = \"StorageDaemon\"",
|
||||
"LOG_DOMAIN = 0xD004301",
|
||||
"KMSG_LOG",
|
||||
]
|
||||
|
||||
if (storage_service_user_file_sharing) {
|
||||
@ -179,6 +180,7 @@ ohos_executable("sdc") {
|
||||
defines = [
|
||||
"STORAGE_LOG_TAG = \"StorageDaemon\"",
|
||||
"LOG_DOMAIN = 0xD004301",
|
||||
"KMSG_LOG",
|
||||
]
|
||||
|
||||
configs = [ ":sdc_config" ]
|
||||
|
@ -57,6 +57,7 @@ ohos_static_library("libsdcrypto") {
|
||||
"LOG_DOMAIN = 0xD004301",
|
||||
"OPENSSL_SUPPRESS_DEPRECATED",
|
||||
"USER_CRYPTO_MIGRATE_KEY",
|
||||
"KMSG_LOG",
|
||||
]
|
||||
|
||||
configs = [ ":storage_daemon_crypto_config" ]
|
||||
|
Loading…
Reference in New Issue
Block a user