Skip to content

Commit 1c74229

Browse files
author
craig
committed
2.0.3 / 2022-03-17
================== * use native console info and debug - @craigparra
1 parent f532989 commit 1c74229

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

CachingConsole.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,28 @@ export default class CachingConsole {
1818
}
1919
}
2020

21+
debug(line) {
22+
this.cache.push(line);
23+
if (this.cache.length > this.size) {
24+
this.cache.shift();
25+
}
26+
if (!this.quiet) {
27+
// eslint-disable-next-line no-console
28+
console.debug(line);
29+
}
30+
}
31+
32+
info(line) {
33+
this.cache.push(line);
34+
if (this.cache.length > this.size) {
35+
this.cache.shift();
36+
}
37+
if (!this.quiet) {
38+
// eslint-disable-next-line no-console
39+
console.info(line);
40+
}
41+
}
42+
2143
warn(line) {
2244
this.cache.push(line);
2345
if (this.cache.length > this.size) {

0 commit comments

Comments
 (0)