mobiletto 1.1.16 → 1.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/test/api.spec.js +3 -3
- package/util/logger.js +5 -1
package/package.json
CHANGED
package/test/api.spec.js
CHANGED
|
@@ -100,9 +100,9 @@ async function writeRandomFile(fixture, size) {
|
|
|
100
100
|
return await fixture.api.write(fixture.name, dataGenerator())
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
|
|
103
|
+
const encryptionTests = () => [null, { key: rand(32) }]
|
|
104
104
|
// const encryptionTests = () => [null]
|
|
105
|
-
const encryptionTests = () => [{ key: rand(32) }]
|
|
105
|
+
// const encryptionTests = () => [{ key: rand(32) }]
|
|
106
106
|
|
|
107
107
|
const REDIS_ENABLED = {
|
|
108
108
|
name: 'redis-enabled',
|
|
@@ -111,7 +111,7 @@ const REDIS_ENABLED = {
|
|
|
111
111
|
}
|
|
112
112
|
const REDIS_DISABLED = {
|
|
113
113
|
name: 'redis-disabled',
|
|
114
|
-
enabled:
|
|
114
|
+
enabled: true,
|
|
115
115
|
config: (cfg) => {
|
|
116
116
|
const newConfig = Object.assign({}, cfg)
|
|
117
117
|
if (!newConfig.opts) { newConfig.opts = {} }
|
package/util/logger.js
CHANGED
|
@@ -2,7 +2,11 @@ const winston = require('winston')
|
|
|
2
2
|
|
|
3
3
|
const logger = winston.createLogger({
|
|
4
4
|
level: process.env.MOBILETTO_LOG_LEVEL || 'error',
|
|
5
|
-
format: winston.format.
|
|
5
|
+
format: winston.format.combine(
|
|
6
|
+
winston.format.timestamp({ format: 'YYYY-MM-DD HH:mm:ss.SSS' }),
|
|
7
|
+
winston.format.printf((info) => {
|
|
8
|
+
return `${info.timestamp} [${info.level.toUpperCase()}] ${info.message}`
|
|
9
|
+
})),
|
|
6
10
|
transports: process.env.MOBILETTO_LOG_FILE
|
|
7
11
|
? [ new winston.transports.File({ filename: process.env.MOBILETTO_LOG_FILE }) ]
|
|
8
12
|
: [ new winston.transports.Console() ]
|