diff --git a/zh-cn/application-dev/application-models/common-event-publish.md b/zh-cn/application-dev/application-models/common-event-publish.md index 0974fabd31b13013c2438bc3ac9d848b972ec64d..deefc5eda98e9d340840ece0206c7d73d13aab0b 100644 --- a/zh-cn/application-dev/application-models/common-event-publish.md +++ b/zh-cn/application-dev/application-models/common-event-publish.md @@ -28,7 +28,6 @@ ```ts import Base from '@ohos.base'; import commonEventManager from '@ohos.commonEventManager'; - import Logger from '../utils/Logger'; const TAG: string = 'ProcessModel'; ``` @@ -57,7 +56,6 @@ ```ts import Base from '@ohos.base'; import commonEventManager from '@ohos.commonEventManager'; - import Logger from '../utils/Logger'; const TAG: string = 'ProcessModel'; ``` diff --git a/zh-cn/application-dev/application-models/common-event-remove-sticky.md b/zh-cn/application-dev/application-models/common-event-remove-sticky.md index 92232e91ece30157fa82af4897ad620099069b89..d1f2e3b99228bf90fe3049ecd712ee90ab18bd12 100644 --- a/zh-cn/application-dev/application-models/common-event-remove-sticky.md +++ b/zh-cn/application-dev/application-models/common-event-remove-sticky.md @@ -23,7 +23,6 @@ ```ts import Base from '@ohos.base'; import commonEventManager from '@ohos.commonEventManager'; - import Logger from '../utils/Logger'; const TAG: string = 'ProcessModel'; ``` @@ -38,11 +37,11 @@ commonEventManager.removeStickyCommonEvent('usual.event.SCREEN_OFF', (err: Base.BusinessError) => { // sticky_event粘性公共事件名 if (err) { - Logger.error(TAG, `Failed to remove sticky common event. Code is ${err.code}, message is ${err.message}`); + console.error(TAG, `Failed to remove sticky common event. Code is ${err.code}, message is ${err.message}`); return; } ... - Logger.info(TAG, `Succeeded in removeing sticky event.`); + console.info(TAG, `Succeeded in removeing sticky event.`); }); ``` diff --git a/zh-cn/application-dev/application-models/common-event-static-subscription.md b/zh-cn/application-dev/application-models/common-event-static-subscription.md index ec7c10eee5718a064e892bc19115fc8aee5a3965..9a816d1bbf10404777f63a4846621f6f9d4fd376 100644 --- a/zh-cn/application-dev/application-models/common-event-static-subscription.md +++ b/zh-cn/application-dev/application-models/common-event-static-subscription.md @@ -23,13 +23,12 @@ ```ts import StaticSubscriberExtensionAbility from '@ohos.application.StaticSubscriberExtensionAbility'; import type commonEventManager from '@ohos.commonEventManager'; - import Logger from '../utils/Logger'; const TAG: string = 'StaticSubscriber'; export default class StaticSubscriber extends StaticSubscriberExtensionAbility { onReceiveEvent(event: commonEventManager.CommonEventData): void { - Logger.info(TAG, 'onReceiveEvent, event: ' + event.event); + console.info(TAG, 'onReceiveEvent, event: ' + event.event); ... } } diff --git a/zh-cn/application-dev/application-models/common-event-subscription.md b/zh-cn/application-dev/application-models/common-event-subscription.md index ccdd650c1b8eec98a7cc2223f773193a08ab36f0..60b8e8cc4af6c34cd787ad6f198dab1bb9486140 100644 --- a/zh-cn/application-dev/application-models/common-event-subscription.md +++ b/zh-cn/application-dev/application-models/common-event-subscription.md @@ -25,7 +25,6 @@ import Base from '@ohos.base'; import commonEventManager from '@ohos.commonEventManager'; import promptAction from '@ohos.promptAction'; - import Logger from '../utils/Logger'; const TAG: string = 'ProcessModel'; ``` diff --git a/zh-cn/application-dev/application-models/common-event-unsubscription.md b/zh-cn/application-dev/application-models/common-event-unsubscription.md index 09a23e1d2b105830714874fbfe87ad73c28de6f2..dad8538ff386c737f0e85dbd083c8d008871e8ef 100644 --- a/zh-cn/application-dev/application-models/common-event-unsubscription.md +++ b/zh-cn/application-dev/application-models/common-event-unsubscription.md @@ -21,7 +21,6 @@ import Base from '@ohos.base'; import commonEventManager from '@ohos.commonEventManager'; import promptAction from '@ohos.promptAction'; - import Logger from '../utils/Logger'; const TAG: string = 'ProcessModel'; ``` @@ -35,12 +34,12 @@ if (this.subscriber !== null) { commonEventManager.unsubscribe(this.subscriber, (err: Base.BusinessError) => { if (err) { - Logger.error(TAG, `UnsubscribeCallBack err = ${JSON.stringify(err)}`); + console.error(TAG, `UnsubscribeCallBack err = ${JSON.stringify(err)}`); } else { promptAction.showToast({ message: $r('app.string.unsubscribe_success_toast') }); - Logger.info(TAG, `Unsubscribe success`); + console.info(TAG, `Unsubscribe success`); this.subscriber = null; } })