• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 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 LOCATION_LOG_H
17 #define LOCATION_LOG_H
18 
19 #include "hilog/log.h"
20 
21 namespace OHOS {
22 namespace Location {
23 enum {
24     LOCATOR_LOG_ID = 0xD002300,
25 };
26 
27 static constexpr OHOS::HiviewDFX::HiLogLabel GEO_CONVERT = {LOG_CORE, LOCATOR_LOG_ID, "GeoConvert"};
28 static constexpr OHOS::HiviewDFX::HiLogLabel LOCATOR = {LOG_CORE, LOCATOR_LOG_ID, "Locator"};
29 static constexpr OHOS::HiviewDFX::HiLogLabel LOCATOR_STANDARD = {LOG_CORE, LOCATOR_LOG_ID, "Locator_standard"};
30 static constexpr OHOS::HiviewDFX::HiLogLabel SWITCH_CALLBACK = {LOG_CORE, LOCATOR_LOG_ID, "SwitchCallback"};
31 static constexpr OHOS::HiviewDFX::HiLogLabel GNSS_STATUS_CALLBACK = {LOG_CORE, LOCATOR_LOG_ID, "GnssStatusCallback"};
32 static constexpr OHOS::HiviewDFX::HiLogLabel NMEA_MESSAGE_CALLBACK = {LOG_CORE, LOCATOR_LOG_ID, "NmeaMessageCallback"};
33 static constexpr OHOS::HiviewDFX::HiLogLabel CACHED_LOCATIONS_CALLBACK = {
34     LOG_CORE, LOCATOR_LOG_ID, "CachedLocationsCallback"
35 };
36 static constexpr OHOS::HiviewDFX::HiLogLabel COUNTRY_CODE_CALLBACK = {
37     LOG_CORE, LOCATOR_LOG_ID, "CountryCodeCallback"
38 };
39 static constexpr OHOS::HiviewDFX::HiLogLabel LOCATING_DATA_CALLBACK = {
40     LOG_CORE, LOCATOR_LOG_ID, "LocatingDataCallback"
41 };
42 static constexpr OHOS::HiviewDFX::HiLogLabel LOCATOR_CALLBACK = {LOG_CORE, LOCATOR_LOG_ID, "LocatorCallback"};
43 static constexpr OHOS::HiviewDFX::HiLogLabel GNSS = {LOG_CORE, LOCATOR_LOG_ID, "GnssAbility"};
44 static constexpr OHOS::HiviewDFX::HiLogLabel GNSS_TEST = {LOG_CORE, LOCATOR_LOG_ID, "GnssAbilityTest"};
45 static constexpr OHOS::HiviewDFX::HiLogLabel NETWORK = {LOG_CORE, LOCATOR_LOG_ID, "NetworkAbility"};
46 static constexpr OHOS::HiviewDFX::HiLogLabel NETWORK_TEST = {LOG_CORE, LOCATOR_LOG_ID, "NetworkAbilityTest"};
47 static constexpr OHOS::HiviewDFX::HiLogLabel PASSIVE = {LOG_CORE, LOCATOR_LOG_ID, "PassiveAbility"};
48 static constexpr OHOS::HiviewDFX::HiLogLabel PASSIVE_TEST = {LOG_CORE, LOCATOR_LOG_ID, "PassiveAbilityTest"};
49 static constexpr OHOS::HiviewDFX::HiLogLabel REQUEST_MANAGER = {LOG_CORE, LOCATOR_LOG_ID, "RequestManager"};
50 static constexpr OHOS::HiviewDFX::HiLogLabel REPORT_MANAGER = {LOG_CORE, LOCATOR_LOG_ID, "ReportManager"};
51 static constexpr OHOS::HiviewDFX::HiLogLabel COMMON_UTILS = {LOG_CORE, LOCATOR_LOG_ID, "CommonUtils"};
52 static constexpr OHOS::HiviewDFX::HiLogLabel LOCATOR_EVENT = {LOG_CORE, LOCATOR_LOG_ID, "LocatorEvent"};
53 static constexpr OHOS::HiviewDFX::HiLogLabel COUNTRY_CODE = {LOG_CORE, LOCATOR_LOG_ID, "CountryCode"};
54 static constexpr OHOS::HiviewDFX::HiLogLabel VISIBILITY_CONTROLLER = {
55     LOG_CORE, LOCATOR_LOG_ID, "VisibilityController"
56 };
57 static constexpr OHOS::HiviewDFX::HiLogLabel FUSION_CONTROLLER = {LOG_CORE, LOCATOR_LOG_ID, "FusionController"};
58 static constexpr OHOS::HiviewDFX::HiLogLabel DISTRIBUTION_CONTROLLER = {
59     LOG_CORE, LOCATOR_LOG_ID, "Location_Distribution"
60 };
61 static constexpr OHOS::HiviewDFX::HiLogLabel HIVIEW_EVENT = {LOG_CORE, LOCATOR_LOG_ID, "ChrEvent"};
62 static constexpr OHOS::HiviewDFX::HiLogLabel LOCATOR_BACKGROUND_PROXY = {
63     LOG_CORE, LOCATOR_LOG_ID, "LocatorBackgroundProxy"
64 };
65 static constexpr OHOS::HiviewDFX::HiLogLabel LOCATION_NAPI = {LOG_CORE, LOCATOR_LOG_ID, "LocationNapi"};
66 
67 #ifndef LBSLOGD
68 #define LBSLOGD(label, ...) (void)OHOS::HiviewDFX::HiLog::Debug(label, __VA_ARGS__)
69 #endif
70 
71 #ifndef LBSLOGE
72 #define LBSLOGE(label, ...) (void)OHOS::HiviewDFX::HiLog::Error(label, __VA_ARGS__)
73 #endif
74 
75 #ifndef LBSLOGF
76 #define LBSLOGF(label, ...) (void)OHOS::HiviewDFX::HiLog::Fatal(label, __VA_ARGS__)
77 #endif
78 
79 #ifndef LBSLOGI
80 #define LBSLOGI(label, ...) (void)OHOS::HiviewDFX::HiLog::Info(label, __VA_ARGS__)
81 #endif
82 
83 #ifndef LBSLOGW
84 #define LBSLOGW(label, ...) (void)OHOS::HiviewDFX::HiLog::Warn(label, __VA_ARGS__)
85 #endif
86 } // namespace Location
87 } // namespace OHOS
88 #endif // LOCATION_LOG_H
89