@fonoster/logger 0.3.3 → 0.3.6-alpha.11

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/dist/logger.js +3 -2
  2. package/package.json +3 -3
package/dist/logger.js CHANGED
@@ -39,14 +39,14 @@ const fluent = new fluentTransport(`${process.env.LOG_OPT_TAG_PREFIX}.fonoster`,
39
39
  });
40
40
  const format = process.env.LOGS_FORMAT === "json"
41
41
  ? winston_1.default.format.json()
42
- : winston_1.default.format.simple();
42
+ : winston_1.default.format.combine(winston_1.default.format.colorize(), winston_1.default.format.simple());
43
43
  const level = process.env.LOGS_LEVEL ? process.env.LOGS_LEVEL : "info";
44
44
  const transports = process.env.LOGS_TRANSPORT === "fluent"
45
45
  ? [fluent]
46
46
  : [new winston_1.default.transports.Console()];
47
47
  const logger = winston_1.default.createLogger({
48
48
  levels: winston_1.default.config.npm.levels,
49
- format: winston_1.default.format.combine(winston_1.default.format.colorize(), format),
49
+ format,
50
50
  transports,
51
51
  level
52
52
  });
@@ -61,6 +61,7 @@ exports.unmute = unmute;
61
61
  const ulogger = (log) => logger[log.level](log.message, {
62
62
  eventType: log.eventType,
63
63
  body: log.body,
64
+ level: log.level,
64
65
  accessKeyId: log.accessKeyId
65
66
  });
66
67
  exports.ulogger = ulogger;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fonoster/logger",
3
- "version": "0.3.3",
3
+ "version": "0.3.6-alpha.11",
4
4
  "description": "Logger module",
5
5
  "author": "Pedro Sanders <psanders@fonoster.com>",
6
6
  "homepage": "https://github.com/fonoster/fonoster#readme",
@@ -30,10 +30,10 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "fluent-logger": "^3.4.1",
33
- "winston": "^3.3.3"
33
+ "winston": "^3.6.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "rimraf": "^3.0.2"
37
37
  },
38
- "gitHead": "cfba6d55b5dc17f1e6d30b6d6d5ad771433d00a4"
38
+ "gitHead": "e5f462ddb2ec0910e5554b73940099dabeafbca1"
39
39
  }