Skip to content
This repository was archived by the owner on Jan 31, 2025. It is now read-only.

Commit a9a11c8

Browse files
author
Daniel Brain
committed
Consume window.LOG_LEVEL if present
1 parent fbaf31c commit a9a11c8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/lib/log.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ export let log = {
8686
logLevel(level, args) {
8787
setTimeout(() => {
8888
try {
89-
if (LOG_LEVELS.indexOf(level) < LOG_LEVELS.indexOf(CONFIG.LOG_LEVEL)) {
89+
let logLevel = window.LOG_LEVEL || CONFIG.LOG_LEVEL;
90+
91+
if (LOG_LEVELS.indexOf(level) < LOG_LEVELS.indexOf(logLevel)) {
9092
return;
9193
}
9294

@@ -136,4 +138,4 @@ export let log = {
136138
error() {
137139
log.logLevel('error', arguments);
138140
}
139-
};
141+
};

0 commit comments

Comments
 (0)