2018-11-03 03:38:00 +01:00
|
|
|
import autobind from 'autobind-decorator';
|
|
|
|
import Channel from '../channel';
|
|
|
|
|
|
|
|
export default class extends Channel {
|
|
|
|
public readonly chName = 'apLog';
|
|
|
|
public static shouldShare = true;
|
2018-11-10 18:22:34 +01:00
|
|
|
public static requireCredential = false;
|
2018-11-03 03:38:00 +01:00
|
|
|
|
|
|
|
@autobind
|
|
|
|
public async init(params: any) {
|
|
|
|
// Subscribe events
|
|
|
|
this.subscriber.on('apLog', this.onLog);
|
|
|
|
}
|
|
|
|
|
|
|
|
@autobind
|
|
|
|
private async onLog(log: any) {
|
|
|
|
this.send('log', log);
|
|
|
|
}
|
|
|
|
|
|
|
|
@autobind
|
|
|
|
public dispose() {
|
|
|
|
// Unsubscribe events
|
|
|
|
this.subscriber.off('apLog', this.onLog);
|
|
|
|
}
|
|
|
|
}
|