2021-10-21 12:49:53 -07:00
|
|
|
// 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 = {
|
2025-06-16 09:47:18 -07:00
|
|
|
fatal(...args) {
|
2021-10-21 12:49:53 -07:00
|
|
|
console.error(...args);
|
|
|
|
},
|
2025-06-16 09:47:18 -07:00
|
|
|
error(...args) {
|
2021-10-21 12:49:53 -07:00
|
|
|
console.error(...args);
|
|
|
|
},
|
2025-06-16 09:47:18 -07:00
|
|
|
warn(...args) {
|
2021-10-21 12:49:53 -07:00
|
|
|
console.warn(...args);
|
|
|
|
},
|
2025-06-16 09:47:18 -07:00
|
|
|
info(...args) {
|
2021-10-21 12:49:53 -07:00
|
|
|
console.info(...args);
|
|
|
|
},
|
2025-06-16 09:47:18 -07:00
|
|
|
debug(...args) {
|
2021-10-21 12:49:53 -07:00
|
|
|
console.debug(...args);
|
|
|
|
},
|
2025-06-16 09:47:18 -07:00
|
|
|
trace(...args) {
|
2021-10-21 12:49:53 -07:00
|
|
|
console.log(...args);
|
|
|
|
},
|
2025-06-16 09:47:18 -07:00
|
|
|
child() {
|
2025-08-06 10:32:08 -07:00
|
|
|
return consoleLogger;
|
2025-06-16 09:47:18 -07:00
|
|
|
},
|
2021-10-21 12:49:53 -07:00
|
|
|
};
|
2023-03-28 15:22:06 -07:00
|
|
|
|
2021-10-21 12:49:53 -07:00
|
|
|
/* eslint-enable no-console */
|