zeddemore-logger 1.2.4 → 1.2.5

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.
@@ -571,7 +571,8 @@ class ZeddemoreLogger {
571
571
  const duration = _duration ? convertMilliseconds(_duration, logger.responseTimeDigits) : '-';
572
572
  let _contentLength = _headers ? _headers[ rsh.CONTENT_LENGTH ] : null;
573
573
  if (!_contentLength) _contentLength = _data ? sizeof(_data) : null;
574
- const contentLength = _contentLength ? `- ${ convertBytes(_contentLength, logger.contentLengthDigits) }` : null;
574
+ const contentLengthDigits = logOptions.contentLengthDigits || logger.contentLengthDigits || DEFAULT_CONTENT_LENGTH_DIGITS;
575
+ const contentLength = _contentLength ? `- ${ convertBytes(_contentLength, contentLengthDigits) }` : null;
575
576
  const parts = [ prefix, method, path, configData, status, responseData, duration, contentLength ];
576
577
  const message = _.compact(parts).join(' ');
577
578
  logger[ logLevel ](message);
@@ -580,6 +581,7 @@ class ZeddemoreLogger {
580
581
  }
581
582
 
582
583
  module.exports = {
584
+ enums,
583
585
  log: ZeddemoreLogger.getLogger,
584
586
  winstonLogLevelIdToName,
585
587
  writeAxiosErrorLog: ZeddemoreLogger.writeAxiosErrorLog,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zeddemore-logger",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "description": "Node.js Express logger using Morgan and Winston for thread and caller info tracking",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,7 +22,7 @@
22
22
  "dependencies": {
23
23
  "chalk": "^4.1.2",
24
24
  "lodash": "^4.17.21",
25
- "morgan": "^1.10.0",
25
+ "morgan": "^1.10.1",
26
26
  "object-sizeof": "^2.6.5",
27
27
  "uuid": "^10.0.0",
28
28
  "winston": "^3.17.0"