@sap-ux/logger
Advanced tools
| import { WinstonLogger } from '../winston-logger'; | ||
| /** | ||
| * | ||
| */ | ||
| export declare class ExtensionLogger extends WinstonLogger { | ||
| /** | ||
| * | ||
| * @param channelName | ||
| */ | ||
| constructor(channelName: string); | ||
@@ -4,0 +11,0 @@ /** |
@@ -9,3 +9,10 @@ "use strict"; | ||
| const adapter_1 = require("../winston-logger/adapter"); | ||
| /** | ||
| * | ||
| */ | ||
| class ExtensionLogger extends winston_logger_1.WinstonLogger { | ||
| /** | ||
| * | ||
| * @param channelName | ||
| */ | ||
| constructor(channelName) { | ||
@@ -12,0 +19,0 @@ const vscodeTransport = new transports_1.VSCodeTransport({ channelName }); |
@@ -11,2 +11,6 @@ import WinstonTransport from 'winston-transport'; | ||
| readonly options: ConsoleTransportOptions; | ||
| /** | ||
| * | ||
| * @param opts | ||
| */ | ||
| constructor(opts?: ConsoleTransportOptions); | ||
@@ -25,2 +29,6 @@ } | ||
| readonly options: UI5ToolingTransportOptions; | ||
| /** | ||
| * | ||
| * @param opts | ||
| */ | ||
| constructor(opts: UI5ToolingTransportOptions); | ||
@@ -33,2 +41,5 @@ } | ||
| private static singletonInstance; | ||
| /** | ||
| * | ||
| */ | ||
| constructor(); | ||
@@ -44,2 +55,6 @@ } | ||
| readonly options: FileTransportOptions; | ||
| /** | ||
| * | ||
| * @param opts | ||
| */ | ||
| constructor(opts: FileTransportOptions); | ||
@@ -53,2 +68,5 @@ } | ||
| } | ||
| /** | ||
| * | ||
| */ | ||
| export declare class StringArrayTransport extends Transport { | ||
@@ -66,2 +84,6 @@ } | ||
| readonly options: VSCodeTransportOptions; | ||
| /** | ||
| * | ||
| * @param opts | ||
| */ | ||
| constructor(opts: VSCodeTransportOptions); | ||
@@ -79,5 +101,17 @@ } | ||
| } | ||
| /** | ||
| * | ||
| */ | ||
| export declare class ArrayTransport extends WinstonTransport { | ||
| readonly logs: ArrayTransportLogEntry[]; | ||
| /** | ||
| * | ||
| * @param opts | ||
| */ | ||
| constructor(opts?: ArrayTransportOptions); | ||
| /** | ||
| * | ||
| * @param info | ||
| * @param next | ||
| */ | ||
| log(info: ArrayTransportLogEntry, next: () => void): void; | ||
@@ -84,0 +118,0 @@ copy: <T>(obj: T) => T; |
@@ -15,2 +15,6 @@ "use strict"; | ||
| options; | ||
| /** | ||
| * | ||
| * @param opts | ||
| */ | ||
| constructor(opts = {}) { | ||
@@ -34,2 +38,6 @@ super(); | ||
| options; | ||
| /** | ||
| * | ||
| * @param opts | ||
| */ | ||
| constructor(opts) { | ||
@@ -54,2 +62,5 @@ super(); | ||
| static singletonInstance; | ||
| /** | ||
| * | ||
| */ | ||
| constructor() { | ||
@@ -69,2 +80,6 @@ super(); | ||
| options; | ||
| /** | ||
| * | ||
| * @param opts | ||
| */ | ||
| constructor(opts) { | ||
@@ -76,2 +91,5 @@ super(); | ||
| exports.FileTransport = FileTransport; | ||
| /** | ||
| * | ||
| */ | ||
| class StringArrayTransport extends types_1.Transport { | ||
@@ -87,2 +105,6 @@ } | ||
| options; | ||
| /** | ||
| * | ||
| * @param opts | ||
| */ | ||
| constructor(opts) { | ||
@@ -102,4 +124,11 @@ super(); | ||
| exports.VSCodeTransport = VSCodeTransport; | ||
| /** | ||
| * | ||
| */ | ||
| class ArrayTransport extends winston_transport_1.default { | ||
| logs; | ||
| /** | ||
| * | ||
| * @param opts | ||
| */ | ||
| constructor(opts) { | ||
@@ -109,2 +138,7 @@ super({ level: typeof opts?.logLevel === 'number' ? types_1.LogLevel[opts.logLevel].toLowerCase() : 'debug' }); | ||
| } | ||
| /** | ||
| * | ||
| * @param info | ||
| * @param next | ||
| */ | ||
| log(info, next) { | ||
@@ -111,0 +145,0 @@ this.logs.push(info); |
+1
-1
@@ -69,3 +69,3 @@ /** | ||
| /** | ||
| * A utility copy method to make immutable, deep copies of objects | ||
| * A utility copy method to make immutable, deep copies of objects. | ||
| * | ||
@@ -72,0 +72,0 @@ * @param obj |
+1
-1
@@ -26,3 +26,3 @@ "use strict"; | ||
| /** | ||
| * A utility copy method to make immutable, deep copies of objects | ||
| * A utility copy method to make immutable, deep copies of objects. | ||
| * | ||
@@ -29,0 +29,0 @@ * @param obj |
@@ -5,3 +5,3 @@ import type { Transport } from '../types'; | ||
| /** | ||
| * Translate @type {LogLevel} to what Winston understands | ||
| * Translate @type {LogLevel} to what Winston understands. | ||
| * | ||
@@ -13,6 +13,5 @@ * @param {LogLevel} logLevel - optional logLevel | ||
| /** | ||
| * Take a @type {Transport} and return the corresponding @type {WinstonTransport} | ||
| * Will throw an error if the transport is not recognized | ||
| * Take a @type {Transport} and return the corresponding @type {WinstonTransport} will throw an error if the transport is not recognized. | ||
| * | ||
| * @param transport | ||
| * @param transport - transport to convert | ||
| * @returns {WinstonTransport} winston transport | ||
@@ -19,0 +18,0 @@ */ |
@@ -49,3 +49,3 @@ "use strict"; | ||
| /** | ||
| * Translate @type {LogLevel} to what Winston understands | ||
| * Translate @type {LogLevel} to what Winston understands. | ||
| * | ||
@@ -98,4 +98,4 @@ * @param {LogLevel} logLevel - optional logLevel | ||
| * | ||
| * @param label | ||
| * @param labelColor | ||
| * @param label - Label name | ||
| * @param labelColor - Label color | ||
| * @returns {string} decorated label | ||
@@ -119,6 +119,5 @@ */ | ||
| /** | ||
| * Take a @type {Transport} and return the corresponding @type {WinstonTransport} | ||
| * Will throw an error if the transport is not recognized | ||
| * Take a @type {Transport} and return the corresponding @type {WinstonTransport} will throw an error if the transport is not recognized. | ||
| * | ||
| * @param transport | ||
| * @param transport - transport to convert | ||
| * @returns {WinstonTransport} winston transport | ||
@@ -125,0 +124,0 @@ */ |
@@ -38,4 +38,5 @@ "use strict"; | ||
| function getVSCodeInstance() { | ||
| // eslint-disable-next-line @typescript-eslint/no-require-imports | ||
| return require('vscode'); | ||
| } | ||
| //# sourceMappingURL=vscode-output-channel-transport.js.map |
+3
-3
| { | ||
| "name": "@sap-ux/logger", | ||
| "version": "0.7.1", | ||
| "version": "0.7.2", | ||
| "description": "A simple logging module", | ||
@@ -43,4 +43,4 @@ "repository": { | ||
| "format": "prettier --write '**/*.{js,json,ts,yaml,yml}' --ignore-path ../../.prettierignore", | ||
| "lint": "eslint . --ext .ts", | ||
| "lint:fix": "eslint . --ext .ts --fix", | ||
| "lint": "eslint", | ||
| "lint:fix": "eslint --fix", | ||
| "test": "jest --maxWorkers=1 --colors --silent", | ||
@@ -47,0 +47,0 @@ "link": "pnpm link --global", |
52287
1.69%1059
8.28%