• 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 LOCATOR_CALLBACK = {LOG_CORE, LOCATOR_LOG_ID, "LocatorCallback"};
40 static constexpr OHOS::HiviewDFX::HiLogLabel GNSS = {LOG_CORE, LOCATOR_LOG_ID, "GnssAbility"};
41 static constexpr OHOS::HiviewDFX::HiLogLabel GNSS_TEST = {LOG_CORE, LOCATOR_LOG_ID, "GnssAbilityTest"};
42 static constexpr OHOS::HiviewDFX::HiLogLabel NETWORK = {LOG_CORE, LOCATOR_LOG_ID, "NetworkAbility"};
43 static constexpr OHOS::HiviewDFX::HiLogLabel NETWORK_TEST = {LOG_CORE, LOCATOR_LOG_ID, "NetworkAbilityTest"};
44 static constexpr OHOS::HiviewDFX::HiLogLabel PASSIVE = {LOG_CORE, LOCATOR_LOG_ID, "PassiveAbility"};
45 static constexpr OHOS::HiviewDFX::HiLogLabel PASSIVE_TEST = {LOG_CORE, LOCATOR_LOG_ID, "PassiveAbilityTest"};
46 static constexpr OHOS::HiviewDFX::HiLogLabel REQUEST_MANAGER = {LOG_CORE, LOCATOR_LOG_ID, "RequestManager"};
47 static constexpr OHOS::HiviewDFX::HiLogLabel REPORT_MANAGER = {LOG_CORE, LOCATOR_LOG_ID, "ReportManager"};
48 static constexpr OHOS::HiviewDFX::HiLogLabel COMMON_UTILS = {LOG_CORE, LOCATOR_LOG_ID, "CommonUtils"};
49 static constexpr OHOS::HiviewDFX::HiLogLabel LOCATOR_EVENT = {LOG_CORE, LOCATOR_LOG_ID, "LocatorEvent"};
50 static constexpr OHOS::HiviewDFX::HiLogLabel COUNTRY_CODE = {LOG_CORE, LOCATOR_LOG_ID, "CountryCode"};
51 static constexpr OHOS::HiviewDFX::HiLogLabel VISIBILITY_CONTROLLER = {
52     LOG_CORE, LOCATOR_LOG_ID, "VisibilityController"
53 };
54 static constexpr OHOS::HiviewDFX::HiLogLabel FUSION_CONTROLLER = {LOG_CORE, LOCATOR_LOG_ID, "FusionController"};
55 static constexpr OHOS::HiviewDFX::HiLogLabel DISTRIBUTION_CONTROLLER = {
56     LOG_CORE, LOCATOR_LOG_ID, "Location_Distribution"
57 };
58 static constexpr OHOS::HiviewDFX::HiLogLabel HIVIEW_EVENT = {LOG_CORE, LOCATOR_LOG_ID, "ChrEvent"};
59 static constexpr OHOS::HiviewDFX::HiLogLabel LOCATOR_BACKGROUND_PROXY = {
60     LOG_CORE, LOCATOR_LOG_ID, "LocatorBackgroundProxy"
61 };
62 static constexpr OHOS::HiviewDFX::HiLogLabel LOCATION_NAPI = {LOG_CORE, LOCATOR_LOG_ID, "LocationNapi"};
63 
64 #ifndef LBSLOGD
65 #define LBSLOGD(label, ...) (void)OHOS::HiviewDFX::HiLog::Debug(label, __VA_ARGS__)
66 #endif
67 
68 #ifndef LBSLOGE
69 #define LBSLOGE(label, ...) (void)OHOS::HiviewDFX::HiLog::Error(label, __VA_ARGS__)
70 #endif
71 
72 #ifndef LBSLOGF
73 #define LBSLOGF(label, ...) (void)OHOS::HiviewDFX::HiLog::Fatal(label, __VA_ARGS__)
74 #endif
75 
76 #ifndef LBSLOGI
77 #define LBSLOGI(label, ...) (void)OHOS::HiviewDFX::HiLog::Info(label, __VA_ARGS__)
78 #endif
79 
80 #ifndef LBSLOGW
81 #define LBSLOGW(label, ...) (void)OHOS::HiviewDFX::HiLog::Warn(label, __VA_ARGS__)
82 #endif
83 } // namespace Location
84 } // namespace OHOS
85 #endif // LOCATION_LOG_H
86