1// Copyright (C) 2024 Huawei Device Co., Ltd.
2// Licensed under the Apache License, Version 2.0 (the "License");
3// you may not use this file except in compliance with the License.
4// You may obtain a copy of the License at
5//
6//     http://www.apache.org/licenses/LICENSE-2.0
7//
8// Unless required by applicable law or agreed to in writing, software
9// distributed under the License is distributed on an "AS IS" BASIS,
10// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11// See the License for the specific language governing permissions and
12// limitations under the License.
13
14/// hilog label.
15
16macro_rules! debug {
17    ($($args:tt)*) => {{
18        use hilog_rust::hilog;
19        use std::ffi::{c_char, CString};
20        use $crate::LOG_LABEL;
21
22        let log = format!($($args)*);
23
24        hilog_rust::debug!(LOG_LABEL,"{}",@public(log));
25    }}
26}
27
28macro_rules! info {
29    ($($args:tt)*) => {{
30        use hilog_rust::hilog;
31        use std::ffi::{c_char, CString};
32        use $crate::LOG_LABEL;
33
34        let log = format!($($args)*);
35
36        hilog_rust::info!(LOG_LABEL,"{}",@public(log));
37    }}
38}
39
40macro_rules! error {
41    ($($args:tt)*) => {{
42        use hilog_rust::hilog;
43        use std::ffi::{c_char, CString};
44        use $crate::LOG_LABEL;
45
46        let log = format!($($args)*);
47
48        hilog_rust::error!(LOG_LABEL,"{}",@public(log));
49    }}
50}
51