@@ -27,39 +27,6 @@ function check() {
27
27
} ;
28
28
}
29
29
30
- // dump the configuration to logger
31
- const ignoreConfigLog = [ 'cert' , 'key' , 'AWS_ACCESS_KEY_ID' , 'AWS_SECRET_ACCESS_KEY' , 'AUTH0_CLIENT_ID' , 'AUTH0_CLIENT_SECRET' ] ;
32
- /**
33
- * Print configs to logger
34
- * @param {Object } params the config params
35
- * @param {Number } level the level of param object
36
- */
37
- function dumpConfigs ( params , level ) {
38
- Object . keys ( params ) . forEach ( ( key ) => {
39
- if ( _ . includes ( ignoreConfigLog , key ) ) {
40
- return ;
41
- }
42
- const item = params [ key ] ;
43
- let str = '' ;
44
- let n = 0 ;
45
- while ( n < level ) { // eslint-disable-line no-restricted-syntax
46
- n ++ ;
47
- str += ' ' ;
48
- }
49
- if ( item && _ . isObject ( item ) ) {
50
- str += `${ key } =` ;
51
- logger . debug ( str ) ;
52
- dumpConfigs ( item , level + 1 ) ;
53
- } else {
54
- str += `${ key } =${ item } ` ;
55
- logger . debug ( str ) ;
56
- }
57
- } ) ;
58
- }
59
- logger . debug ( '--- List of Configurations ---' ) ;
60
- dumpConfigs ( config , 0 ) ;
61
- logger . debug ( '--- End of List of Configurations ---' ) ;
62
-
63
30
const webhooks = require ( './routes/webhooks' ) ;
64
31
65
32
const app = express ( ) ;
@@ -107,4 +74,37 @@ process.on('unhandledRejection', (err) => {
107
74
logger . logFullError ( err , 'system' ) ;
108
75
} ) ;
109
76
77
+ // dump the configuration to logger
78
+ const ignoreConfigLog = [ 'cert' , 'key' , 'AWS_ACCESS_KEY_ID' , 'AWS_SECRET_ACCESS_KEY' , 'AUTH0_CLIENT_ID' , 'AUTH0_CLIENT_SECRET' ] ;
79
+ /**
80
+ * Print configs to logger
81
+ * @param {Object } params the config params
82
+ * @param {Number } level the level of param object
83
+ */
84
+ function dumpConfigs ( params , level ) {
85
+ Object . keys ( params ) . forEach ( ( key ) => {
86
+ if ( _ . includes ( ignoreConfigLog , key ) ) {
87
+ return ;
88
+ }
89
+ const item = params [ key ] ;
90
+ let str = '' ;
91
+ let n = 0 ;
92
+ while ( n < level ) { // eslint-disable-line no-restricted-syntax
93
+ n ++ ;
94
+ str += ' ' ;
95
+ }
96
+ if ( item && _ . isObject ( item ) ) {
97
+ str += `${ key } =` ;
98
+ logger . debug ( str ) ;
99
+ dumpConfigs ( item , level + 1 ) ;
100
+ } else {
101
+ str += `${ key } =${ item } ` ;
102
+ logger . debug ( str ) ;
103
+ }
104
+ } ) ;
105
+ }
106
+ logger . debug ( '--- List of Configurations ---' ) ;
107
+ dumpConfigs ( config , 0 ) ;
108
+ logger . debug ( '--- End of List of Configurations ---' ) ;
109
+
110
110
module . exports = app ;
0 commit comments