mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2025-07-12 16:56:24 +00:00
Make log messages typed
This commit is contained in:
@ -6,10 +6,11 @@ import { WebSocketService } from './websocket.service';
|
||||
import { ProcessLogCommand } from './processlog-command';
|
||||
import { config } from '../config';
|
||||
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
|
||||
import { LogMessage } from './log.message';
|
||||
|
||||
@Injectable()
|
||||
export class ProcessLogService {
|
||||
newLogs = new BehaviorSubject<any>(config.console.defaultLogs);
|
||||
newLogs = new BehaviorSubject<LogMessage>(config.console.defaultLogs);
|
||||
showLiveLogs = config.console.showLiveLogs;
|
||||
|
||||
command_handlers = {
|
||||
@ -23,9 +24,9 @@ export class ProcessLogService {
|
||||
);
|
||||
}
|
||||
|
||||
emitNewLogsIfNoLiveLogs(log: any) {
|
||||
emitNewLogsIfNoLiveLogs(logs: LogMessage) {
|
||||
if (!config.console.showLiveLogs) {
|
||||
this.newLogs.next(log);
|
||||
this.newLogs.next(logs);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user