Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4bdd02c

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

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

‎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
exportconstNODE_ENV:Env=process.env.NODE_ENV||'production'
1515

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

2019
// error logging tool
2120
exportconstSENTRY_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
exportconstDEBUG:boolean=(process.env.REACT_APP_DEBUG||'').toLowerCase()==='true'
1010
exportconstVERSION:string=process.env.VERSION||'unknown'
1111
exportconstNODE_ENV:string=process.env.NODE_ENV||'development'
12-
exportconstLOG:boolean=
13-
(process.env.REACT_APP_LOG||'').toLowerCase()==='true'&&process.env.NODE_ENV!=='production'
12+
exportconstLOG:boolean=(process.env.REACT_APP_LOG||'').toLowerCase()==='true'
1413
exportconstTUTORIAL_LIST_URL:string=process.env.REACT_APP_TUTORIAL_LIST_URL||''
1514
exportconstSENTRY_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
exporttypeLog=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
exportdefaultlogger

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp