199da06d0Sopenharmony_ci/**
299da06d0Sopenharmony_ci * Copyright (c) 2022 Huawei Device Co., Ltd.
399da06d0Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
499da06d0Sopenharmony_ci * you may not use this file except in compliance with the License.
599da06d0Sopenharmony_ci * You may obtain a copy of the License at
699da06d0Sopenharmony_ci *
799da06d0Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
899da06d0Sopenharmony_ci *
999da06d0Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1099da06d0Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1199da06d0Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1299da06d0Sopenharmony_ci * See the License for the specific language governing permissions and
1399da06d0Sopenharmony_ci * limitations under the License.
1499da06d0Sopenharmony_ci */
1599da06d0Sopenharmony_ci
1699da06d0Sopenharmony_ci/**
1799da06d0Sopenharmony_ci * Log Util
1899da06d0Sopenharmony_ci *
1999da06d0Sopenharmony_ci * standard:
2099da06d0Sopenharmony_ci * 1. define TAG, recommend class name.
2199da06d0Sopenharmony_ci * 2. switch IS_DEBUG_ON as true, when debugging.
2299da06d0Sopenharmony_ci * 3. msg should be short and valuable.
2399da06d0Sopenharmony_ci * 4. choose appropriate function.
2499da06d0Sopenharmony_ci * 5. the function execute many times can not print.
2599da06d0Sopenharmony_ci * 6. uniqueness.
2699da06d0Sopenharmony_ci */
2799da06d0Sopenharmony_ci
2899da06d0Sopenharmony_ci/**
2999da06d0Sopenharmony_ci *  log package tool class
3099da06d0Sopenharmony_ci */
3199da06d0Sopenharmony_ciexport class LogUtils {
3299da06d0Sopenharmony_ci  d(TAG, msg): void {
3399da06d0Sopenharmony_ci    console.debug('[callui:]' + TAG + ':' + msg);
3499da06d0Sopenharmony_ci  }
3599da06d0Sopenharmony_ci
3699da06d0Sopenharmony_ci  i(TAG, msg): void {
3799da06d0Sopenharmony_ci    console.info('[callui:]' + TAG + ':' + msg);
3899da06d0Sopenharmony_ci  }
3999da06d0Sopenharmony_ci
4099da06d0Sopenharmony_ci  w(TAG, msg): void {
4199da06d0Sopenharmony_ci    console.warn('[callui:]' + TAG + ':' + msg);
4299da06d0Sopenharmony_ci  }
4399da06d0Sopenharmony_ci
4499da06d0Sopenharmony_ci  e(TAG, msg): void {
4599da06d0Sopenharmony_ci    console.error('[callui:]' + TAG + ':' + msg);
4699da06d0Sopenharmony_ci  }
4799da06d0Sopenharmony_ci}
4899da06d0Sopenharmony_ci
4999da06d0Sopenharmony_cilet mLogUtil = new LogUtils();
5099da06d0Sopenharmony_ci
5199da06d0Sopenharmony_ciexport default mLogUtil as LogUtils;
5299da06d0Sopenharmony_ci
53