enhance(plugin): better log for beforeunload hook on user side

This commit is contained in:
charlie
2023-08-30 12:07:53 +08:00
committed by Tienson Qin
parent bba8aa5729
commit 2eaa1162e1
2 changed files with 2 additions and 2 deletions

View File

@@ -924,7 +924,7 @@ class PluginLocal extends EventEmitter<
)
this.emit('beforeunload', eventBeforeUnload)
} catch (e) {
this.logger.error('[beforeunload Error]', e)
this.logger.error('[beforeunload]', e)
}
await this.dispose()

View File

@@ -513,7 +513,7 @@ export class LSPluginUser
cb && (await cb(rest))
actor?.resolve(null)
} catch (e) {
console.debug(`${_caller.debugTag} [beforeunload] `, e)
this.logger.error(`[beforeunload] `, e)
actor?.reject(e)
}
})