@things-factory/env 7.0.1-rc.0 → 7.0.1-rc.7

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.
Files changed (2) hide show
  1. package/lib/logger.js +4 -4
  2. package/package.json +2 -2
package/lib/logger.js CHANGED
@@ -4,7 +4,7 @@ var config = require('./config')
4
4
  var { createLogger, format, transports } = require('winston')
5
5
  require('winston-daily-rotate-file')
6
6
 
7
- const { combine, timestamp, splat, simple, printf } = format
7
+ const { combine, errors, splat, printf } = format
8
8
 
9
9
  var { file: fileConfig, console: consoleConfig } = config.get('logger', {})
10
10
 
@@ -35,11 +35,11 @@ const systemTimestamp = format((info, opts) => {
35
35
  return info
36
36
  })
37
37
 
38
- const logFormat = printf(({ level, message, timestamp }) => {
39
- return `${timestamp} ${level}: ${message}`
38
+ const logFormat = printf(({ level, message, timestamp, stack }) => {
39
+ return `${timestamp} ${level}: ${stack || message}`
40
40
  })
41
41
 
42
42
  module.exports = createLogger({
43
- format: combine(systemTimestamp({ tz: SYSTEM_TZ }), splat(), logFormat),
43
+ format: combine(errors({ stack: true }), systemTimestamp({ tz: SYSTEM_TZ }), splat(), logFormat),
44
44
  transports: logTransports
45
45
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/env",
3
- "version": "7.0.1-rc.0",
3
+ "version": "7.0.1-rc.7",
4
4
  "description": "Things Factory running environment helper library",
5
5
  "main": "index.js",
6
6
  "author": "heartyoh@hatiolab.com",
@@ -27,5 +27,5 @@
27
27
  "winston": "^3.2.1",
28
28
  "winston-daily-rotate-file": "^4.2.1"
29
29
  },
30
- "gitHead": "45476b164b69aef2c211d9a5257897f42d8e2f5f"
30
+ "gitHead": "0e8c627f3fbb83cc1c3fadac3ec342cb8f3f0149"
31
31
  }