Use console logger when regular is not available
This commit is contained in:
parent
b2407f8310
commit
2c51c3fe84
3 changed files with 32 additions and 23 deletions
27
ts/util/consoleLogger.ts
Normal file
27
ts/util/consoleLogger.ts
Normal file
|
@ -0,0 +1,27 @@
|
|||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import type { LoggerType } from '../types/Logging';
|
||||
|
||||
/* eslint-disable no-console */
|
||||
export const consoleLogger: LoggerType = {
|
||||
fatal(...args: Array<unknown>) {
|
||||
console.error(...args);
|
||||
},
|
||||
error(...args: Array<unknown>) {
|
||||
console.error(...args);
|
||||
},
|
||||
warn(...args: Array<unknown>) {
|
||||
console.warn(...args);
|
||||
},
|
||||
info(...args: Array<unknown>) {
|
||||
console.info(...args);
|
||||
},
|
||||
debug(...args: Array<unknown>) {
|
||||
console.debug(...args);
|
||||
},
|
||||
trace(...args: Array<unknown>) {
|
||||
console.log(...args);
|
||||
},
|
||||
};
|
||||
/* eslint-enable no-console */
|
Loading…
Add table
Add a link
Reference in a new issue