slight logger improvement for test

This commit is contained in:
tiagosiebler
2022-09-16 00:51:18 +01:00
parent bd09cf8109
commit a9dd6face9
7 changed files with 43 additions and 23 deletions

View File

@@ -1,13 +1,15 @@
import { WebsocketClient, WsClientEvent } from '../src';
export const silentLogger = {
silly: () => {},
debug: () => {},
notice: () => {},
info: () => {},
warning: (...params) => console.warn('warning', ...params),
error: (...params) => console.error('error', ...params),
};
export function getSilentLogger(logHint?: string) {
return {
silly: () => {},
debug: () => {},
notice: () => {},
info: () => {},
warning: (...params) => console.warn('warning', logHint, ...params),
error: (...params) => console.error('error', logHint, ...params),
};
}
export const fullLogger = {
silly: (...params) => console.log('silly', ...params),