Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use console logger when regular is not available
Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
- Loading branch information
1 parent
18a4158
commit f5c1bb1
Showing
3 changed files
with
32 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 */ |