mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-06-03 08:28:54 -04:00
fix: include uuid in iframe communicator logger
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
865e127d16
commit
d5455f7c33
5 changed files with 27 additions and 12 deletions
|
@ -19,7 +19,7 @@ export class EditorToRendererCommunicator extends WindowPostMessageCommunicator<
|
|||
EditorToRendererMessageType,
|
||||
CommunicationMessages
|
||||
> {
|
||||
protected createLogger(): Logger {
|
||||
return new Logger('EditorToRendererCommunicator')
|
||||
protected createLogger(uuid: string): Logger {
|
||||
return new Logger(`EditorToRendererCommunicator[${uuid}]`)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ export class RendererToEditorCommunicator extends WindowPostMessageCommunicator<
|
|||
RendererToEditorMessageType,
|
||||
CommunicationMessages
|
||||
> {
|
||||
protected createLogger(): Logger {
|
||||
return new Logger('RendererToEditorCommunicator')
|
||||
protected createLogger(uuid: string): Logger {
|
||||
return new Logger(`RendererToEditorCommunicator[${uuid}]`)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,14 +45,14 @@ export abstract class WindowPostMessageCommunicator<
|
|||
) {
|
||||
this.boundListener = this.handleEvent.bind(this)
|
||||
this.communicationEnabled = false
|
||||
this.log = this.createLogger()
|
||||
this.log = this.createLogger(uuid)
|
||||
}
|
||||
|
||||
public getUuid(): string {
|
||||
return this.uuid
|
||||
}
|
||||
|
||||
protected abstract createLogger(): Logger
|
||||
protected abstract createLogger(uuid: string): Logger
|
||||
|
||||
/**
|
||||
* Registers the event listener on the current global {@link window}.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue