Skip to content

Commit 6fd1953

Browse files
committed
revert debugging changes... it was a setting on the github repo
1 parent de3f772 commit 6fd1953

File tree

5 files changed

+17
-29
lines changed

5 files changed

+17
-29
lines changed

.github/workflows/deploy.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ jobs:
2525
run: |
2626
npm ci
2727
npm run build
28+
npm run obfuscate
2829
2930
- name: Deploy 🚀
3031
uses: JamesIves/github-pages-deploy-action@v4
3132
with:
3233
folder: build
33-
# clean-exclude: pr-preview/
34-
# force: false
34+
clean-exclude: pr-preview/
35+
force: false

.github/workflows/preview.yml

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
run: |
3939
npm ci
4040
npm run build
41+
npm run obfuscate
4142
4243
- name: Deploy preview
4344
uses: rossjrw/pr-preview-action@v1

src/lib/index.ts

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import { TelemetryServiceMock } from './telemetry/service_mock';
2020
const init_start = performance.now();
2121

2222
export const log = new Log(IS_PRODUCTION_BUILD ? Log.INFO : Log.TRACE);
23-
log.setLevel(IS_PRODUCTION_BUILD ? Log.INFO : Log.TRACE);
2423

2524
log.debug(init_start, 'Initializing...');
2625
log.debug('Config:', {

src/lib/log.ts

+13-26
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
1-
const LEVEL = {
2-
ASSERT: 1,
3-
ERROR: 2,
4-
WARN: 3,
5-
INFO: 4,
6-
DEBUG: 5,
7-
TRACE: 6
8-
} as const;
9-
101
export class Log {
11-
static readonly ASSERT = LEVEL.ASSERT;
12-
static readonly ERROR = LEVEL.ERROR;
13-
static readonly WARN = LEVEL.WARN;
14-
static readonly INFO = LEVEL.INFO;
15-
static readonly DEBUG = LEVEL.DEBUG;
16-
static readonly TRACE = LEVEL.TRACE;
2+
static readonly ASSERT = 1;
3+
static readonly ERROR = 2;
4+
static readonly WARN = 3;
5+
static readonly INFO = 4;
6+
static readonly DEBUG = 5;
7+
static readonly TRACE = 6;
178

189
assert = console.assert.bind(console);
1910
error = console.error.bind(console);
@@ -22,7 +13,7 @@ export class Log {
2213
debug = console.debug.bind(console);
2314
trace = console.log.bind(console);
2415

25-
level: number = Log.INFO;
16+
level = Log.INFO;
2617

2718
constructor(level?: number) {
2819
if (level !== undefined) {
@@ -32,22 +23,18 @@ export class Log {
3223
}
3324

3425
setLevel(level: number) {
35-
console.log('Current log level:', this.level);
36-
console.log('New log level:', level);
37-
console.log('Log.INFO:', Log.INFO);
38-
console.log('Log.DEBUG:', Log.DEBUG);
3926
this.level = level;
4027
if (level >= Log.ASSERT) this.assert = console.assert.bind(console);
41-
else this.assert = () => {};
28+
else this.assert = function () {};
4229
if (level >= Log.ERROR) this.error = console.error.bind(console);
43-
else this.error = () => {};
30+
else this.error = function () {};
4431
if (level >= Log.WARN) this.warn = console.warn.bind(console);
45-
else this.warn = () => {};
32+
else this.warn = function () {};
4633
if (level >= Log.INFO) this.info = console.info.bind(console);
47-
else this.info = () => {};
34+
else this.info = function () {};
4835
if (level >= Log.DEBUG) this.debug = console.debug.bind(console);
49-
else this.debug = () => {};
36+
else this.debug = function () {};
5037
if (level >= Log.TRACE) this.trace = console.log.bind(console);
51-
else this.trace = () => {};
38+
else this.trace = function () {};
5239
}
5340
}

static/.nojekyll

Whitespace-only changes.

0 commit comments

Comments
 (0)