Logging/src/types.ts
2019-04-02 19:55:04 -04:00

26 lines
499 B
TypeScript

import { ObservableInterface } from "@hibas123/utils";
export enum LoggingTypes {
Log,
Warning,
Error,
Debug
}
export interface Message {
type: LoggingTypes;
name?: string;
text: {
raw: string[],
formatted: string[]
};
date: Date;
file: string;
}
export interface Adapter {
init(observable: ObservableInterface<Message>, name?: string): void | Promise<void>;
flush(sync: true): void;
flush(sync: false): void | Promise<void>;
}