summaryrefslogtreecommitdiffhomepage
path: root/gui/src/renderer/lib/logging.ts
blob: 433ba20f8ff2dfa1433cb49e32daa22d076d05c2 (plain)
1
2
3
4
5
6
7
8
9
10
import { IpcRendererEventChannel } from '../../shared/ipc-event-channel';
import { ILogOutput, LogLevel } from '../../shared/logging-types';

export default class IpcOutput implements ILogOutput {
  constructor(public level: LogLevel) {}

  public write(level: LogLevel, message: string) {
    IpcRendererEventChannel.logging.log({ level: level, message });
  }
}