aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-util/src/logging.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-util/src/logging.ts')
-rw-r--r--packages/taler-util/src/logging.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/taler-util/src/logging.ts b/packages/taler-util/src/logging.ts
index b14274560..79fc49cdd 100644
--- a/packages/taler-util/src/logging.ts
+++ b/packages/taler-util/src/logging.ts
@@ -35,6 +35,10 @@ export enum LogLevel {
let globalLogLevel = LogLevel.Info;
const byTagLogLevel: Record<string, LogLevel> = {};
+export function getGlobalLogLevel(): string {
+ return globalLogLevel;
+}
+
export function setGlobalLogLevelFromString(logLevelStr: string): void {
globalLogLevel = getLevelForString(logLevelStr);
}
@@ -98,7 +102,7 @@ function writeNodeLog(
* and uses the corresponding console.* method to log in the browser.
*/
export class Logger {
- constructor(private tag: string) {}
+ constructor(private tag: string) { }
shouldLogTrace(): boolean {
const level = byTagLogLevel[this.tag] ?? globalLogLevel;