Socket
Socket
Sign inDemoInstall

winston-appinsights-transport

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

winston-appinsights-transport - npm Package Compare versions

Comparing version 0.1.6 to 0.1.7

3

CHANGELOG.md
# ApplicationInsights Winstron Transport
## 0.1.7
- fix for request logging
## 0.1.6

@@ -4,0 +7,0 @@ - expose request log api

3

dist/index.d.ts
import * as TransportStream from 'winston-transport';
import * as ai from 'applicationinsights';
export interface AppInsightsCustomFields {
[key: string]: string;
[key: string]: any;
}

@@ -32,3 +32,2 @@ export interface AppInsightsOptions {

log({message, level, ...properties}: TransportStream.TransportLogInfo, callback: Function): any;
request(req: AppInsightsRequest, properties: AppInsightsCustomFields): void;
}

@@ -75,14 +75,25 @@ "use strict";

}
this.client.trackTrace({
message: message,
severity: exports.getApplicationInsightsSeverity(level),
properties: Object.assign({}, properties, this.customFields),
});
if (properties.url) {
const { name, url, duration, resultCode, success, source } = properties, customFields = __rest(properties, ["name", "url", "duration", "resultCode", "success", "source"]);
this.client.trackRequest({
name: properties.name,
url: properties.url,
duration: parseInt(properties.duration, 10),
resultCode: properties.resultCode,
success: !!properties.success,
source: properties.source,
properties: Object.assign({}, customFields, this.customFields),
});
}
else {
this.client.trackTrace({
message: message,
severity: exports.getApplicationInsightsSeverity(level),
properties: Object.assign({}, properties, this.customFields),
});
}
return callback(null);
}
request(req, properties) {
this.client.trackRequest(Object.assign({}, req, { properties: Object.assign({}, properties, this.customFields) }));
}
}
exports.AppInsightsTransport = AppInsightsTransport;
//# sourceMappingURL=index.js.map
{
"name": "winston-appinsights-transport",
"version": "0.1.6",
"version": "0.1.7",
"description": "A winston transport for Application Insights",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc