@mimik/sumologic-winston-logger 1.6.23 → 1.6.25

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/index.js CHANGED
@@ -93,6 +93,10 @@ if (config.mode.includes(AWS_KINESIS)) {
93
93
  serverType: config.server.type,
94
94
  serverId: config.server.id,
95
95
  format: format.combine(format.timestamp(), format.json()),
96
+ httpOptions: {
97
+ socketTimeout: config[AWS_KINESIS].httpOptions.socketTimeout,
98
+ connectionTimeout: config[AWS_KINESIS].httpOptions.connectionTimeout,
99
+ },
96
100
  });
97
101
  awsKinesis.on(WARN, (data) => miniLog.warn('Could not send logs: ', data));
98
102
  // awsKinesis.on(LOG, (data) => console.log('awsKinesis done')); // miniLog.info('Information sent: ', data));
@@ -1,4 +1,5 @@
1
1
  const axios = require('axios');
2
+ const { inspect } = require('util');
2
3
  const Transport = require('winston-transport');
3
4
 
4
5
  const {
@@ -35,10 +36,12 @@ module.exports = class Sumo extends Transport {
35
36
  data.serverType = this.serverType;
36
37
  data.serverId = this.serverId;
37
38
  }
39
+
38
40
  axios({
39
41
  method: 'POST',
40
42
  url: `${this.endpoint}${this.code}`,
41
- data,
43
+ // Convert the payload to a string representation that tolerates circular references.
44
+ data: inspect(data, { depth: null, compact: false }),
42
45
  })
43
46
  .then(() => this.emit(LOG, { message: `log sent to ${SUMOLOGIC}` }))
44
47
  .catch((err) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mimik/sumologic-winston-logger",
3
- "version": "1.6.23",
3
+ "version": "1.6.25",
4
4
  "description": "Log wrapper for sumo, s3, kinesis and winston",
5
5
  "main": "index.js",
6
6
  "scripts": {