1b0b2a9adSopenharmony_ci/* 2b0b2a9adSopenharmony_ci * Copyright (c) 2022-2023 Huawei Device Co., Ltd. 3b0b2a9adSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 4b0b2a9adSopenharmony_ci * you may not use this file except in compliance with the License. 5b0b2a9adSopenharmony_ci * You may obtain a copy of the License at 6b0b2a9adSopenharmony_ci * 7b0b2a9adSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 8b0b2a9adSopenharmony_ci * 9b0b2a9adSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 10b0b2a9adSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 11b0b2a9adSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12b0b2a9adSopenharmony_ci * See the License for the specific language governing permissions and 13b0b2a9adSopenharmony_ci * limitations under the License. 14b0b2a9adSopenharmony_ci */ 15b0b2a9adSopenharmony_ci 16b0b2a9adSopenharmony_ciimport hilog from '@ohos.hilog'; 17b0b2a9adSopenharmony_ci 18b0b2a9adSopenharmony_ciclass Logger { 19b0b2a9adSopenharmony_ci private domain: number; 20b0b2a9adSopenharmony_ci private prefix: string; 21b0b2a9adSopenharmony_ci private format: string = '%{public}s, %{public}s'; 22b0b2a9adSopenharmony_ci 23b0b2a9adSopenharmony_ci constructor(prefix: string) { 24b0b2a9adSopenharmony_ci this.prefix = prefix; 25b0b2a9adSopenharmony_ci this.domain = 0x6977; 26b0b2a9adSopenharmony_ci } 27b0b2a9adSopenharmony_ci 28b0b2a9adSopenharmony_ci debug(...args: unknown[]):void { 29b0b2a9adSopenharmony_ci hilog.debug(this.domain, this.prefix, this.format, args); 30b0b2a9adSopenharmony_ci } 31b0b2a9adSopenharmony_ci 32b0b2a9adSopenharmony_ci info(...args: unknown[]):void { 33b0b2a9adSopenharmony_ci hilog.info(this.domain, this.prefix, this.format, args); 34b0b2a9adSopenharmony_ci } 35b0b2a9adSopenharmony_ci 36b0b2a9adSopenharmony_ci warn(...args: unknown[]):void { 37b0b2a9adSopenharmony_ci hilog.warn(this.domain, this.prefix, this.format, args); 38b0b2a9adSopenharmony_ci } 39b0b2a9adSopenharmony_ci 40b0b2a9adSopenharmony_ci error(...args: unknown[]):void { 41b0b2a9adSopenharmony_ci hilog.error(this.domain, this.prefix, this.format, args); 42b0b2a9adSopenharmony_ci } 43b0b2a9adSopenharmony_ci} 44b0b2a9adSopenharmony_ci 45b0b2a9adSopenharmony_ciexport default new Logger('[adminprovisioning]');