@opentelemetry/winston-transport
Advanced tools
Comparing version 0.2.0 to 0.3.0
@@ -1,7 +0,7 @@ | ||
import * as Transport from 'winston-transport'; | ||
export declare class OpenTelemetryTransportV3 extends Transport { | ||
import TransportStream = require('winston-transport'); | ||
export declare class OpenTelemetryTransportV3 extends TransportStream { | ||
private _logger; | ||
constructor(options?: Transport.TransportStreamOptions); | ||
log(info: any, next: () => void): void; | ||
constructor(options?: TransportStream.TransportStreamOptions); | ||
log(info: any, callback: () => void): void; | ||
} | ||
//# sourceMappingURL=OpenTelemetryTransportV3.d.ts.map |
@@ -20,6 +20,6 @@ "use strict"; | ||
const api_logs_1 = require("@opentelemetry/api-logs"); | ||
const Transport = require("winston-transport"); | ||
const TransportStream = require("winston-transport"); | ||
const version_1 = require("./version"); | ||
const utils_1 = require("./utils"); | ||
class OpenTelemetryTransportV3 extends Transport { | ||
class OpenTelemetryTransportV3 extends TransportStream { | ||
constructor(options) { | ||
@@ -29,3 +29,3 @@ super(options); | ||
} | ||
log(info, next) { | ||
log(info, callback) { | ||
try { | ||
@@ -37,7 +37,5 @@ (0, utils_1.emitLogRecord)(info, this._logger); | ||
} | ||
setImmediate(() => { | ||
this.emit('logged', info); | ||
}); | ||
if (next) { | ||
setImmediate(next); | ||
this.emit('logged', info); | ||
if (callback) { | ||
callback(); | ||
} | ||
@@ -44,0 +42,0 @@ } |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "0.2.0"; | ||
export declare const VERSION = "0.3.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -20,3 +20,3 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.VERSION = '0.2.0'; | ||
exports.VERSION = '0.3.0'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@opentelemetry/winston-transport", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "OpenTelemetry Transport for winston", | ||
@@ -53,7 +53,7 @@ "main": "build/src/index.js", | ||
"dependencies": { | ||
"@opentelemetry/api-logs": "^0.50.0", | ||
"@opentelemetry/api-logs": "^0.51.0", | ||
"winston-transport": "4.*" | ||
}, | ||
"homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/winston-transport#readme", | ||
"gitHead": "17a0bc1da3baa472ba9b867eee3c60730cc130fb" | ||
"gitHead": "96a87b48934f0afcf1fe637eed6704f35bd8e973" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
30749
173
+ Added@opentelemetry/api-logs@0.51.1(transitive)
- Removed@opentelemetry/api-logs@0.50.0(transitive)