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 58a4ee15c6b14188ee73e52a0133cf5028128cef..7238c9a6d2319841a43b1b3383b871ac3a573c62 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 @@ -35,11 +35,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 2fcb11c0c3a6a0bb4bbe5d86fb2f2ad3c93974d3..85f6cc2f31bf3298c132ff2973a14c2ec718ecfb 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 @@ -30,7 +30,7 @@ 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-unsubscription.md b/zh-cn/application-dev/application-models/common-event-unsubscription.md index d52895a66c354c8e797ff265e2073de436176f25..af2b877eda851ff9f71c04a3d52442dde7fe2fa2 100644 --- a/zh-cn/application-dev/application-models/common-event-unsubscription.md +++ b/zh-cn/application-dev/application-models/common-event-unsubscription.md @@ -32,12 +32,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; } })