File tree Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ import { UserController } from './Controllers/UserController';
48
48
import { UsersRouter } from './Routers/UsersRouter' ;
49
49
50
50
import ParsePushAdapter from 'parse-server-push-adapter' ;
51
+ import winston from 'winston' ;
51
52
// Mutate the Parse object to add the Cloud Code handlers
52
53
addParseCloud ( ) ;
53
54
@@ -115,6 +116,7 @@ class ParseServer {
115
116
} ,
116
117
liveQuery = { } ,
117
118
sessionLength = 31536000 , // 1 Year in seconds
119
+ verbose = false ,
118
120
} ) {
119
121
// Initialize the node client SDK automatically
120
122
Parse . initialize ( appId , javascriptKey || 'unused' , masterKey ) ;
@@ -149,6 +151,9 @@ class ParseServer {
149
151
}
150
152
}
151
153
154
+ if ( verbose || process . env . VERBOSE || process . env . VERBOSE_PARSE_SERVER ) {
155
+ winston . level = 'silly' ;
156
+ }
152
157
153
158
const filesControllerAdapter = loadAdapter ( filesAdapter , ( ) => {
154
159
return new GridStoreAdapter ( databaseURI ) ;
Original file line number Diff line number Diff line change @@ -170,5 +170,9 @@ export default {
170
170
env : "PARSE_SERVER_SESSION_LENGTH" ,
171
171
help : "Session duration, defaults to 1 year" ,
172
172
action : numberParser ( "sessionLength" )
173
+ } ,
174
+ "verbose" : {
175
+ env : "VERBOSE" ,
176
+ help : "Set the logging to verbose"
173
177
}
174
178
} ;
Original file line number Diff line number Diff line change @@ -4,14 +4,6 @@ import S3Adapter from 'parse-server-s3-adapter'
4
4
import FileSystemAdapter from 'parse-server-fs-adapter'
5
5
import { useExternal } from './deprecated'
6
6
7
- if ( process . env . VERBOSE || process . env . VERBOSE_PARSE_SERVER ) {
8
- winston . level = 'silly' ;
9
- }
10
-
11
- if ( process . env . DEBUG || process . env . DEBUG_PARSE_SERVER ) {
12
- winston . level = 'debug' ;
13
- }
14
-
15
7
// Factory function
16
8
let _ParseServer = function ( options ) {
17
9
let server = new ParseServer ( options ) ;
You can’t perform that action at this time.
0 commit comments