• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef SAMGR_PROXY_INCLUDE_SAM_LOG_H
17 #define SAMGR_PROXY_INCLUDE_SAM_LOG_H
18 
19 #include "hilog/log.h"
20 
21 namespace OHOS {
22 #undef LOG_DOMAIN
23 #ifdef SAMGR_PROXY
24 #define LOG_DOMAIN 0xD001810
25 #else
26 #define LOG_DOMAIN 0xD001800
27 #endif
28 
29 #undef LOG_TAG
30 #ifdef SAMGR_PROXY
31 #define LOG_TAG "SA_CLIENT"
32 #else
33 #define LOG_TAG "SAMGR"
34 #endif
35 
36 #ifdef HILOGF
37 #undef HILOGF
38 #endif
39 
40 #ifdef HILOGE
41 #undef HILOGE
42 #endif
43 
44 #ifdef HILOGW
45 #undef HILOGW
46 #endif
47 
48 #ifdef HILOGI
49 #undef HILOGI
50 #endif
51 
52 #ifdef HILOGD
53 #undef HILOGD
54 #endif
55 
56 #define HILOGF(...) HILOG_FATAL(LOG_CORE, __VA_ARGS__)
57 #define HILOGE(...) HILOG_ERROR(LOG_CORE, __VA_ARGS__)
58 #define HILOGW(...) HILOG_WARN(LOG_CORE, __VA_ARGS__)
59 #define HILOGI(...) HILOG_INFO(LOG_CORE, __VA_ARGS__)
60 #define HILOGD(...) HILOG_DEBUG(LOG_CORE, __VA_ARGS__)
61 } // namespace OHOS
62 
63 #endif // #ifndef SAMGR_PROXY_INCLUDE_SAM_LOG_H
64