@opentelemetry/winston-transport 0.3.0 → 0.4.0

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/README.md CHANGED
@@ -55,9 +55,9 @@ Winston `3.x`
55
55
 
56
56
  ## Useful links
57
57
 
58
- * For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
59
- * For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>
60
- * For help or feedback on this project, join us in [GitHub Discussions][discussions-url]
58
+ - For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
59
+ - For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>
60
+ - For help or feedback on this project, join us in [GitHub Discussions][discussions-url]
61
61
 
62
62
  ## License
63
63
 
@@ -23,7 +23,7 @@ const utils_1 = require("./utils");
23
23
  class OpenTelemetryTransportV3 extends TransportStream {
24
24
  constructor(options) {
25
25
  super(options);
26
- this._logger = api_logs_1.logs.getLogger('@opentelemetry/winston-transport', version_1.VERSION);
26
+ this._logger = api_logs_1.logs.getLogger(version_1.PACKAGE_NAME, version_1.PACKAGE_VERSION);
27
27
  }
28
28
  log(info, callback) {
29
29
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"OpenTelemetryTransportV3.js","sourceRoot":"","sources":["../../src/OpenTelemetryTransportV3.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,sDAAuD;AACvD,qDAAsD;AACtD,uCAAoC;AACpC,mCAAwC;AAExC,MAAa,wBAAyB,SAAQ,eAAe;IAG3D,YAAY,OAAgD;QAC1D,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,OAAO,GAAG,eAAI,CAAC,SAAS,CAAC,kCAAkC,EAAE,iBAAO,CAAC,CAAC;IAC7E,CAAC;IAEe,GAAG,CAAC,IAAS,EAAE,QAAoB;QACjD,IAAI;YACF,IAAA,qBAAa,EAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;SACnC;QAAC,OAAO,KAAK,EAAE;YACd,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;SAC1B;QACD,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QAC1B,IAAI,QAAQ,EAAE;YACZ,QAAQ,EAAE,CAAC;SACZ;IACH,CAAC;CACF;AAnBD,4DAmBC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Logger, logs } from '@opentelemetry/api-logs';\nimport TransportStream = require('winston-transport');\nimport { VERSION } from './version';\nimport { emitLogRecord } from './utils';\n\nexport class OpenTelemetryTransportV3 extends TransportStream {\n private _logger: Logger;\n\n constructor(options?: TransportStream.TransportStreamOptions) {\n super(options);\n this._logger = logs.getLogger('@opentelemetry/winston-transport', VERSION);\n }\n\n public override log(info: any, callback: () => void) {\n try {\n emitLogRecord(info, this._logger);\n } catch (error) {\n this.emit('warn', error);\n }\n this.emit('logged', info);\n if (callback) {\n callback();\n }\n }\n}\n"]}
1
+ {"version":3,"file":"OpenTelemetryTransportV3.js","sourceRoot":"","sources":["../../src/OpenTelemetryTransportV3.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,sDAAuD;AACvD,qDAAsD;AACtD,uCAA0D;AAC1D,mCAAwC;AAExC,MAAa,wBAAyB,SAAQ,eAAe;IAG3D,YAAY,OAAgD;QAC1D,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,OAAO,GAAG,eAAI,CAAC,SAAS,CAAC,sBAAY,EAAE,yBAAe,CAAC,CAAC;IAC/D,CAAC;IAEe,GAAG,CAAC,IAAS,EAAE,QAAoB;QACjD,IAAI;YACF,IAAA,qBAAa,EAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;SACnC;QAAC,OAAO,KAAK,EAAE;YACd,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;SAC1B;QACD,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QAC1B,IAAI,QAAQ,EAAE;YACZ,QAAQ,EAAE,CAAC;SACZ;IACH,CAAC;CACF;AAnBD,4DAmBC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Logger, logs } from '@opentelemetry/api-logs';\nimport TransportStream = require('winston-transport');\nimport { PACKAGE_NAME, PACKAGE_VERSION } from './version';\nimport { emitLogRecord } from './utils';\n\nexport class OpenTelemetryTransportV3 extends TransportStream {\n private _logger: Logger;\n\n constructor(options?: TransportStream.TransportStreamOptions) {\n super(options);\n this._logger = logs.getLogger(PACKAGE_NAME, PACKAGE_VERSION);\n }\n\n public override log(info: any, callback: () => void) {\n try {\n emitLogRecord(info, this._logger);\n } catch (error) {\n this.emit('warn', error);\n }\n this.emit('logged', info);\n if (callback) {\n callback();\n }\n }\n}\n"]}
@@ -1,2 +1,3 @@
1
- export declare const VERSION = "0.3.0";
1
+ export declare const PACKAGE_VERSION = "0.4.0";
2
+ export declare const PACKAGE_NAME = "@opentelemetry/winston-transport";
2
3
  //# sourceMappingURL=version.d.ts.map
@@ -15,7 +15,8 @@
15
15
  * limitations under the License.
16
16
  */
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.VERSION = void 0;
18
+ exports.PACKAGE_NAME = exports.PACKAGE_VERSION = void 0;
19
19
  // this is autogenerated file, see scripts/version-update.js
20
- exports.VERSION = '0.3.0';
20
+ exports.PACKAGE_VERSION = '0.4.0';
21
+ exports.PACKAGE_NAME = '@opentelemetry/winston-transport';
21
22
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4DAA4D;AAC/C,QAAA,OAAO,GAAG,OAAO,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '0.3.0';\n"]}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4DAA4D;AAC/C,QAAA,eAAe,GAAG,OAAO,CAAC;AAC1B,QAAA,YAAY,GAAG,kCAAkC,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const PACKAGE_VERSION = '0.4.0';\nexport const PACKAGE_NAME = '@opentelemetry/winston-transport';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentelemetry/winston-transport",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "OpenTelemetry Transport for winston",
5
5
  "main": "build/src/index.js",
6
6
  "types": "build/src/index.d.ts",
@@ -50,9 +50,9 @@
50
50
  "typescript": "4.4.4"
51
51
  },
52
52
  "dependencies": {
53
- "@opentelemetry/api-logs": "^0.51.0",
53
+ "@opentelemetry/api-logs": "^0.52.0",
54
54
  "winston-transport": "4.*"
55
55
  },
56
56
  "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/winston-transport#readme",
57
- "gitHead": "96a87b48934f0afcf1fe637eed6704f35bd8e973"
57
+ "gitHead": "0af1b70f7c3c9763c85ac51fa5e334c1e1512020"
58
58
  }