mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 16:53:34 +00:00
* Use logService for console messages * Implement a base ConsoleLog service Use this class as a default for other services that would like to output to console. This service is overriden in CLI and Desktop to use CLI's consoleLogService and electronLogService, respectively. * Use browser-process-hrtime for timing * test LogService implementations * Ignore default import of hrtime * Clean up imports. Require ConsoleLog injection Co-authored-by: Matt Gibson <mdgibson@Matts-MBP.lan>
12 lines
389 B
TypeScript
12 lines
389 B
TypeScript
import { LogLevelType } from '../enums/logLevelType';
|
|
|
|
export abstract class LogService {
|
|
debug: (message: string) => void;
|
|
info: (message: string) => void;
|
|
warning: (message: string) => void;
|
|
error: (message: string) => void;
|
|
write: (level: LogLevelType, message: string) => void;
|
|
time: (label: string) => void;
|
|
timeEnd: (label: string) => [number, number];
|
|
}
|