Skip to content

Commit d6885b8

Browse files
committed
fix log due to env being prod
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
1 parent c01a7d1 commit d6885b8

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

src/channel/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ class Channel implements Channel {
187187
})
188188
// update the current stepId on startup
189189
vscode.commands.executeCommand(COMMANDS.SET_CURRENT_STEP, action.payload)
190-
logger('Continue tutorial setup')
191190
return
192191
case 'EDITOR_VALIDATE_SETUP':
193192
// check workspace is selected

src/environment.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ export type Env = 'test' | 'local' | 'development' | 'production'
1414
export const NODE_ENV: Env = process.env.NODE_ENV || 'production'
1515

1616
// toggle logging in development
17-
export const LOG: boolean =
18-
(process.env.REACT_APP_LOG || '').toLowerCase() === 'true' && process.env.NODE_ENV !== 'production'
17+
export const LOG: boolean = (process.env.REACT_APP_LOG || '').toLowerCase() === 'true'
1918

2019
// error logging tool
2120
export const SENTRY_DSN: string | null = process.env.SENTRY_DSN || null

web-app/src/environment.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ for (const required of requiredKeys) {
99
export const DEBUG: boolean = (process.env.REACT_APP_DEBUG || '').toLowerCase() === 'true'
1010
export const VERSION: string = process.env.VERSION || 'unknown'
1111
export const NODE_ENV: string = process.env.NODE_ENV || 'development'
12-
export const LOG: boolean =
13-
(process.env.REACT_APP_LOG || '').toLowerCase() === 'true' && process.env.NODE_ENV !== 'production'
12+
export const LOG: boolean = (process.env.REACT_APP_LOG || '').toLowerCase() === 'true'
1413
export const TUTORIAL_LIST_URL: string = process.env.REACT_APP_TUTORIAL_LIST_URL || ''
1514
export const SENTRY_DSN: string | null = process.env.REACT_APP_SENTRY_DSN || null

web-app/src/services/logger/index.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { LOG } from '../../environment'
1+
import { LOG, VERSION, NODE_ENV } from '../../environment'
22

33
export type Log = string | object
44

@@ -17,4 +17,11 @@ const logger = (...messages: Log[]): void => {
1717
}
1818
}
1919

20+
logger(`
21+
ENV
22+
---
23+
VERSION: ${VERSION}
24+
NODE_ENV: ${NODE_ENV}
25+
`)
26+
2027
export default logger

0 commit comments

Comments
 (0)