diff --git a/.prettierrc b/.prettierrc index c4664cb..42ee9d2 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,4 +1,5 @@ { + "printWidth": 120, "trailingComma": "all", "tabWidth": 2, "semi": true, diff --git a/example-project/index.js b/example-project/index.js index 08847b1..768d812 100644 --- a/example-project/index.js +++ b/example-project/index.js @@ -19,29 +19,22 @@ const logger = new Logtail(process.argv[2], { sendLogsToConsoleOutput: true }); // Usage // Send debug level log using the debug() method -const debugLog = logger.debug( - `I am using Better Stack! (${process.title} v${ - process.versions?.[process.title] - })`, -); +const debugLog = logger.debug(`I am using Better Stack! (${process.title} v${process.versions?.[process.title]})`); // Send info level log using the info() method const infoLog = logger.info("An interesting event occurred!"); // Send warn level log using the warn() method // You can add additional structured data to help you troubleshoot your code as shown below -const warningLog = logger.warn( - "Something is not quite right, better check on it.", - { - user: { - username: "someuser", - email: "someuser@example.com", - }, - additional_info: { - tried_accessing: "/url/of/error", - }, +const warningLog = logger.warn("Something is not quite right, better check on it.", { + user: { + username: "someuser", + email: "someuser@example.com", }, -); + additional_info: { + tried_accessing: "/url/of/error", + }, +}); // Example of logging errors in catch clause function callbackThatMightFail() { diff --git a/packages/browser/src/browser.ts b/packages/browser/src/browser.ts index 47dc431..da2a27b 100644 --- a/packages/browser/src/browser.ts +++ b/packages/browser/src/browser.ts @@ -1,11 +1,6 @@ import "cross-fetch/polyfill"; -import { - Context, - ILogLevel, - ILogtailLog, - ILogtailOptions, -} from "@logtail/types"; +import { Context, ILogLevel, ILogtailLog, ILogtailOptions } from "@logtail/types"; import { Base } from "@logtail/core"; // Awaiting: https://bugs.chromium.org/p/chromium/issues/detail?id=571722 @@ -55,11 +50,7 @@ export class Browser extends Base { * @param context: (Context) - Log context for passing structured data * @returns Promise after syncing */ - public async log( - message: string, - level?: ILogLevel, - context: TContext = {} as TContext, - ) { + public async log(message: string, level?: ILogLevel, context: TContext = {} as TContext) { // Wrap context in an object, if it's not already if (typeof context !== "object") { const wrappedContext: unknown = { extra: context }; diff --git a/packages/bunyan/src/bunyan.ts b/packages/bunyan/src/bunyan.ts index 9085632..c770d61 100644 --- a/packages/bunyan/src/bunyan.ts +++ b/packages/bunyan/src/bunyan.ts @@ -51,8 +51,7 @@ export class LogtailStream extends Writable { // Get message // NOTE: Bunyan passes empty 'msg' when msg is missing const use_msg_field = log.msg !== undefined && log.msg.length > 0; - const msg = - (use_msg_field ? log.msg : log.message) || ""; + const msg = (use_msg_field ? log.msg : log.message) || ""; // Prevent overriding 'message' with 'msg' // Save 'message' as 'message_field' if we are using 'msg' as message @@ -64,12 +63,7 @@ export class LogtailStream extends Writable { const level = getLogLevel(log.level); // Log to Logtail - void this._logtail.log( - msg, - level, - meta, - stackContextHint as StackContextHint, - ); + void this._logtail.log(msg, level, meta, stackContextHint as StackContextHint); next(); } diff --git a/packages/core/src/base.test.ts b/packages/core/src/base.test.ts index 981ec20..6cf1933 100644 --- a/packages/core/src/base.test.ts +++ b/packages/core/src/base.test.ts @@ -309,12 +309,7 @@ describe("base class tests", () => { return logs; }); - await Promise.all([ - base.debug(message), - base.info(message), - base.warn(message), - base.error(message), - ]); + await Promise.all([base.debug(message), base.info(message), base.warn(message), base.error(message)]); // Should sync all logs in single call expect(syncCount).toBe(1); diff --git a/packages/core/src/base.ts b/packages/core/src/base.ts index 117f619..372c6b5 100644 --- a/packages/core/src/base.ts +++ b/packages/core/src/base.ts @@ -1,18 +1,5 @@ -import { - ILogLevel, - ILogtailLog, - ILogtailOptions, - Context, - LogLevel, - Middleware, - Sync, -} from "@logtail/types"; -import { - makeBatch, - makeBurstProtection, - makeThrottle, - calculateJsonLogSizeBytes, -} from "@logtail/tools"; +import { ILogLevel, ILogtailLog, ILogtailOptions, Context, LogLevel, Middleware, Sync } from "@logtail/types"; +import { makeBatch, makeBurstProtection, makeThrottle, calculateJsonLogSizeBytes } from "@logtail/tools"; import { serializeError } from "serialize-error"; // Types @@ -273,10 +260,7 @@ class Logtail { } // Manually serialize the log data - transformedLog = this.serialize( - transformedLog, - this._options.contextObjectMaxDepth, - ); + transformedLog = this.serialize(transformedLog, this._options.contextObjectMaxDepth); if (!this._options.sendLogsToBetterStack) { // Return the resulting log before sending it @@ -308,17 +292,8 @@ class Logtail { return transformedLog as ILogtailLog & TContext; } - private serialize( - value: any, - maxDepth: number, - visitedObjects: WeakSet = new WeakSet(), - ): any { - if ( - value === null || - typeof value === "boolean" || - typeof value === "number" || - typeof value === "string" - ) { + private serialize(value: any, maxDepth: number, visitedObjects: WeakSet = new WeakSet()): any { + if (value === null || typeof value === "boolean" || typeof value === "number" || typeof value === "string") { return value; } else if (value instanceof Date) { // Date instances can be invalid & toISOString() will fail @@ -329,10 +304,7 @@ class Logtail { return value.toISOString(); } else if (value instanceof Error) { return serializeError(value); - } else if ( - (typeof value === "object" || Array.isArray(value)) && - (maxDepth < 1 || visitedObjects.has(value)) - ) { + } else if ((typeof value === "object" || Array.isArray(value)) && (maxDepth < 1 || visitedObjects.has(value))) { if (visitedObjects.has(value)) { if (this._options.contextObjectCircularRefWarn) { console.warn( @@ -349,9 +321,7 @@ class Logtail { return ``; } else if (Array.isArray(value)) { visitedObjects.add(value); - const serializedArray = value.map(item => - this.serialize(item, maxDepth - 1, visitedObjects), - ); + const serializedArray = value.map(item => this.serialize(item, maxDepth - 1, visitedObjects)); visitedObjects.delete(value); return serializedArray; @@ -364,11 +334,7 @@ class Logtail { const key = item[0]; const value = item[1]; - const serializedValue = this.serialize( - value, - maxDepth - 1, - visitedObjects, - ); + const serializedValue = this.serialize(value, maxDepth - 1, visitedObjects); if (serializedValue !== undefined) { serializedObject[key] = serializedValue; } @@ -392,10 +358,7 @@ class Logtail { * @param context: (Pick) - Context (optional) * @returns Promise after syncing */ - public async debug( - message: Message, - context: TContext = {} as TContext, - ) { + public async debug(message: Message, context: TContext = {} as TContext) { return this.log(message, LogLevel.Debug, context); } @@ -407,10 +370,7 @@ class Logtail { * @param context: (Pick) - Context (optional) * @returns Promise after syncing */ - public async info( - message: Message, - context: TContext = {} as TContext, - ) { + public async info(message: Message, context: TContext = {} as TContext) { return this.log(message, LogLevel.Info, context); } @@ -422,10 +382,7 @@ class Logtail { * @param context: (Pick) - Context (optional) * @returns Promise after syncing */ - public async warn( - message: Message, - context: TContext = {} as TContext, - ) { + public async warn(message: Message, context: TContext = {} as TContext) { return this.log(message, LogLevel.Warn, context); } @@ -437,10 +394,7 @@ class Logtail { * @param context: (Pick) - Context (optional) * @returns Promise after syncing */ - public async error( - message: Message, - context: TContext = {} as TContext, - ) { + public async error(message: Message, context: TContext = {} as TContext) { return this.log(message, LogLevel.Error, context); } diff --git a/packages/edge/src/context.ts b/packages/edge/src/context.ts index ed0f543..5ec425d 100644 --- a/packages/edge/src/context.ts +++ b/packages/edge/src/context.ts @@ -27,13 +27,7 @@ export function getStackContext(logtail: Edge): Context { } function getCallingFrame(logtail: Edge): StackFrame | null { - for (let fn of [ - logtail.warn, - logtail.error, - logtail.info, - logtail.debug, - logtail.log, - ]) { + for (let fn of [logtail.warn, logtail.error, logtail.info, logtail.debug, logtail.log]) { const stack = stackTrace.get(fn as any); if (stack.length > 0) return getRelevantStackFrame(stack); } @@ -43,9 +37,7 @@ function getCallingFrame(logtail: Edge): StackFrame | null { function getRelevantStackFrame(frames: StackFrame[]): StackFrame { let reversedFrames = frames.reverse(); - let index = reversedFrames.findIndex( - frame => frame.getTypeName() === "EdgeWithExecutionContext", - ); + let index = reversedFrames.findIndex(frame => frame.getTypeName() === "EdgeWithExecutionContext"); if (index > 0) return reversedFrames[index - 1]; diff --git a/packages/edge/src/edge.ts b/packages/edge/src/edge.ts index 96b806c..84211d8 100644 --- a/packages/edge/src/edge.ts +++ b/packages/edge/src/edge.ts @@ -1,12 +1,6 @@ import { encode } from "@msgpack/msgpack"; -import { - Context, - ILogLevel, - ILogtailLog, - ILogtailEdgeOptions, - LogLevel, -} from "@logtail/types"; +import { Context, ILogLevel, ILogtailLog, ILogtailEdgeOptions, LogLevel } from "@logtail/types"; import { Base } from "@logtail/core"; import { ExecutionContext } from "@cloudflare/workers-types"; @@ -22,14 +16,10 @@ export class Edge extends Base { private readonly warnAboutMissingExecutionContext: Boolean; - public constructor( - sourceToken: string, - options?: Partial, - ) { + public constructor(sourceToken: string, options?: Partial) { super(sourceToken, options); - this.warnAboutMissingExecutionContext = - options?.warnAboutMissingExecutionContext ?? true; + this.warnAboutMissingExecutionContext = options?.warnAboutMissingExecutionContext ?? true; // Sync function const sync = async (logs: ILogtailLog[]): Promise => { @@ -78,10 +68,7 @@ export class Edge extends Base { if (ctx) { ctx.waitUntil(log); - } else if ( - this.warnAboutMissingExecutionContext && - !this._warnedAboutMissingCtx - ) { + } else if (this.warnAboutMissingExecutionContext && !this._warnedAboutMissingCtx) { this._warnedAboutMissingCtx = true; const warningMessage = @@ -134,10 +121,6 @@ export class Edge extends Base { private encodeAsMsgpack(logs: ILogtailLog[]): Uint8Array { const encoded = encode(logs); - return new Uint8Array( - encoded.buffer, - encoded.byteOffset, - encoded.byteLength, - ); + return new Uint8Array(encoded.buffer, encoded.byteOffset, encoded.byteLength); } } diff --git a/packages/koa/src/koa.ts b/packages/koa/src/koa.ts index 3b0d9f1..bd6c61c 100644 --- a/packages/koa/src/koa.ts +++ b/packages/koa/src/koa.ts @@ -36,30 +36,18 @@ interface IKoaOptions { } const defaultKoaOpt: IKoaOptions = { - contextPaths: [ - "statusCode", - "request.headers", - "request.method", - "request.length", - "request.url", - "request.query", - ], + contextPaths: ["statusCode", "request.headers", "request.method", "request.length", "request.url", "request.query"], excludedRoutes: [], excludedMethods: [], level: LogLevel.Info, messageFormatter: ctx => `Koa HTTP request: ${ctx.status}`, - errorMessageFormatter: (ctx, e) => - `Koa HTTP request error: ${(typeof e === "object" && e.message) || e}`, + errorMessageFormatter: (ctx, e) => `Koa HTTP request error: ${(typeof e === "object" && e.message) || e}`, }; class KoaLogtail extends Logtail { protected _koaOptions: IKoaOptions; - public constructor( - sourceToken: string, - logtailOpt?: Partial, - koaOpt?: Partial, - ) { + public constructor(sourceToken: string, logtailOpt?: Partial, koaOpt?: Partial) { super(sourceToken, logtailOpt); // Set Koa-specific logging options @@ -115,8 +103,7 @@ class KoaLogtail extends Logtail { if ( !this._koaOptions.excludedMethods.includes(ctx.request.method) && !this._koaOptions.excludedRoutes.includes(ctx.request.url) && - this._toLevelNumber(logLevel) >= - this._toLevelNumber(this._koaOptions.level) + this._toLevelNumber(logLevel) >= this._toLevelNumber(this._koaOptions.level) ) { void this[logLevel](msg!, this._fromContext(ctx)); } diff --git a/packages/node/src/context.ts b/packages/node/src/context.ts index 5f4d89e..d426521 100644 --- a/packages/node/src/context.ts +++ b/packages/node/src/context.ts @@ -10,10 +10,7 @@ const mainFile = mainFileName(); * * @returns Context The caller's filename and the line number */ -export function getStackContext( - logtail: Node, - stackContextHint?: StackContextHint, -): Context { +export function getStackContext(logtail: Node, stackContextHint?: StackContextHint): Context { const stackFrame = getCallingFrame(logtail, stackContextHint); if (stackFrame === null) return {}; @@ -35,17 +32,8 @@ export function getStackContext( }; } -function getCallingFrame( - logtail: Node, - stackContextHint?: StackContextHint, -): StackFrame | null { - for (let fn of [ - logtail.warn, - logtail.error, - logtail.info, - logtail.debug, - logtail.log, - ]) { +function getCallingFrame(logtail: Node, stackContextHint?: StackContextHint): StackFrame | null { + for (let fn of [logtail.warn, logtail.error, logtail.info, logtail.debug, logtail.log]) { const stack = stackTrace.get(fn as any); if (stack.length > 0) return getRelevantStackFrame(stack, stackContextHint); } @@ -53,10 +41,7 @@ function getCallingFrame( return null; } -function getRelevantStackFrame( - frames: StackFrame[], - stackContextHint?: StackContextHint, -): StackFrame { +function getRelevantStackFrame(frames: StackFrame[], stackContextHint?: StackContextHint): StackFrame { if (stackContextHint) { frames.reverse(); let index = frames.findIndex(frame => { diff --git a/packages/node/src/node.test.ts b/packages/node/src/node.test.ts index 6539194..69a5bb5 100644 --- a/packages/node/src/node.test.ts +++ b/packages/node/src/node.test.ts @@ -71,11 +71,7 @@ describe("node tests", () => { it("should enable piping logs to a writable stream", async () => { // Create a writable stream const writeStream = new Writable({ - write( - chunk: any, - encoding: string, - callback: (error?: Error | null) => void, - ): void { + write(chunk: any, encoding: string, callback: (error?: Error | null) => void): void { // Will be a buffered JSON string -- parse const log: ILogtailLog = JSON.parse(chunk.toString()); diff --git a/packages/node/src/node.ts b/packages/node/src/node.ts index fd5cf98..9454879 100644 --- a/packages/node/src/node.ts +++ b/packages/node/src/node.ts @@ -3,14 +3,7 @@ import { Duplex, Writable } from "stream"; import fetch from "cross-fetch"; import { encode } from "@msgpack/msgpack"; -import { - Context, - ILogLevel, - ILogtailLog, - ILogtailOptions, - LogLevel, - StackContextHint, -} from "@logtail/types"; +import { Context, ILogLevel, ILogtailLog, ILogtailOptions, LogLevel, StackContextHint } from "@logtail/types"; import { Base } from "@logtail/core"; import { getStackContext } from "./context"; @@ -88,11 +81,7 @@ export class Node extends Base { private encodeAsMsgpack(logs: ILogtailLog[]): Buffer { const encoded = encode(logs); - const buffer = Buffer.from( - encoded.buffer, - encoded.byteOffset, - encoded.byteLength, - ); + const buffer = Buffer.from(encoded.buffer, encoded.byteOffset, encoded.byteLength); return buffer; } } diff --git a/packages/pino/src/pino.ts b/packages/pino/src/pino.ts index 386218f..c1057c8 100644 --- a/packages/pino/src/pino.ts +++ b/packages/pino/src/pino.ts @@ -1,12 +1,7 @@ import build from "pino-abstract-transport"; import { Logtail } from "@logtail/node"; -import { - Context, - LogLevel, - ILogtailOptions, - StackContextHint, -} from "@logtail/types"; +import { Context, LogLevel, ILogtailOptions, StackContextHint } from "@logtail/types"; import { getLogLevel } from "./helpers"; @@ -27,16 +22,7 @@ export interface IPinoLogtailOptions { const stackContextHint = { fileName: "node_modules/pino", - methodNames: [ - "log", - "fatal", - "error", - "warn", - "info", - "debug", - "trace", - "silent", - ], + methodNames: ["log", "fatal", "error", "warn", "info", "debug", "trace", "silent"], }; export async function logtailTransport(options: IPinoLogtailOptions) { @@ -57,9 +43,7 @@ export async function logtailTransport(options: IPinoLogtailOptions) { // Carry over any additional data fields Object.keys(obj) - .filter( - key => ["time", "msg", "message", "level", "v"].indexOf(key) < 0, - ) + .filter(key => ["time", "msg", "message", "level", "v"].indexOf(key) < 0) .forEach(key => (meta[key] = obj[key])); // Get message diff --git a/packages/tools/src/batch.test.ts b/packages/tools/src/batch.test.ts index 1876ffa..0c420d8 100644 --- a/packages/tools/src/batch.test.ts +++ b/packages/tools/src/batch.test.ts @@ -150,8 +150,7 @@ describe("batch tests", () => { const end = calcEndTime(start); // Expect time to have taken at least this long... - const expectedTime = - ((numberOfLogs / batchSize) * throttleResolveAfter) / maxThrottle; + const expectedTime = ((numberOfLogs / batchSize) * throttleResolveAfter) / maxThrottle; expect(end).toBeGreaterThanOrEqual(expectedTime); }); @@ -196,14 +195,7 @@ describe("batch tests", () => { const sizeBytes = 500; const calculateSize = (_log: ILogtailLog) => 50; - const batcher = makeBatch( - size, - sendTimeout, - retryCount, - retryBackoff, - sizeBytes, - calculateSize, - ); + const batcher = makeBatch(size, sendTimeout, retryCount, retryBackoff, sizeBytes, calculateSize); const logger = batcher.initPusher(async (_batch: ILogtailLog[]) => { called(); }); @@ -225,8 +217,7 @@ describe("JSON log size calculator", () => { }; const actualLogSizeBytes = calculateJsonLogSizeBytes(log); - const expectedLogSizeBytes = '{"dt":"????-??-??T??:??:??.???Z","level":"INFO","message":"My message"},' - .length; + const expectedLogSizeBytes = '{"dt":"????-??-??T??:??:??.???Z","level":"INFO","message":"My message"},'.length; expect(actualLogSizeBytes).toEqual(expectedLogSizeBytes); }); diff --git a/packages/tools/src/batch.ts b/packages/tools/src/batch.ts index 8bb1ea8..a9350e6 100644 --- a/packages/tools/src/batch.ts +++ b/packages/tools/src/batch.ts @@ -34,8 +34,7 @@ const DEFAULT_RETRY_BACKOFF = 100; /* * Default function for computing log size (serialized JSON length + 1 for comma) */ -export const calculateJsonLogSizeBytes = (log: ILogtailLog) => - JSON.stringify(log).length + 1; +export const calculateJsonLogSizeBytes = (log: ILogtailLog) => JSON.stringify(log).length + 1; /** * batch the buffer coming in, process them and then resolve @@ -53,9 +52,7 @@ export default function makeBatch( retryCount: number = DEFAULT_RETRY_COUNT, retryBackoff: number = DEFAULT_RETRY_BACKOFF, sizeBytes: number = 0, - calculateLogSizeBytes: ( - log: ILogtailLog, - ) => number = calculateJsonLogSizeBytes, + calculateLogSizeBytes: (log: ILogtailLog) => number = calculateJsonLogSizeBytes, ) { let timeout: NodeJS.Timeout | null; let cb: Function; @@ -134,9 +131,7 @@ export default function makeBatch( // If the buffer is full enough, flush it // Unless we're still waiting for the minimum retry backoff time - const isBufferFullEnough = - buffer.length >= size || - (sizeBytes > 0 && bufferSizeBytes >= sizeBytes); + const isBufferFullEnough = buffer.length >= size || (sizeBytes > 0 && bufferSizeBytes >= sizeBytes); if (isBufferFullEnough && Date.now() > minRetryBackoff) { await flush(); } else { diff --git a/packages/tools/src/burstProtection.ts b/packages/tools/src/burstProtection.ts index 07eb92f..800d222 100644 --- a/packages/tools/src/burstProtection.ts +++ b/packages/tools/src/burstProtection.ts @@ -30,9 +30,7 @@ export default function makeBurstProtection any>( } // Prepend callCounts with correct number of zeroes and keep its length to RESOLUTION at max - const intervalCountSinceLast = Math.floor( - (now - lastIntervalTime) / intervalLength, - ); + const intervalCountSinceLast = Math.floor((now - lastIntervalTime) / intervalLength); callCounts = Array(Math.min(intervalCountSinceLast, RESOLUTION)) .fill(0) .concat(callCounts) @@ -59,9 +57,7 @@ export default function makeBurstProtection any>( const now = Date.now(); if (lastErrorOutput < now - milliseconds) { lastErrorOutput = now; - console.error( - `${functionName} was called more than ${max} times during last ${milliseconds}ms. Ignoring.`, - ); + console.error(`${functionName} was called more than ${max} times during last ${milliseconds}ms. Ignoring.`); } }; }; diff --git a/packages/tools/src/retry.ts b/packages/tools/src/retry.ts index 8ac6961..f58e426 100644 --- a/packages/tools/src/retry.ts +++ b/packages/tools/src/retry.ts @@ -19,9 +19,7 @@ function delay(sec: number): Promise { * * @param fn - (logs: ILogtailLog[]) => Promise */ -export default async function makeRetry( - fn: (logs: ILogtailLog[]) => Promise, -) { +export default async function makeRetry(fn: (logs: ILogtailLog[]) => Promise) { /** * number of retries */ diff --git a/packages/tools/src/throttle.ts b/packages/tools/src/throttle.ts index 28cd163..716a614 100644 --- a/packages/tools/src/throttle.ts +++ b/packages/tools/src/throttle.ts @@ -5,9 +5,7 @@ import { InferArgs } from "./types"; * Create a throttle which runs up to `max` async functions at once * @param max - maximum number of async functions to run */ -export default function makeThrottle any>( - max: number, -) { +export default function makeThrottle any>(max: number) { // Current iteration cycle let current = 0; diff --git a/packages/tools/src/types.ts b/packages/tools/src/types.ts index 5be65df..ed88414 100644 --- a/packages/tools/src/types.ts +++ b/packages/tools/src/types.ts @@ -16,6 +16,4 @@ export interface IQueue { * Infer arguments based on the Promise return value */ -export type InferArgs = T extends (...args: any[]) => Promise - ? U - : void; +export type InferArgs = T extends (...args: any[]) => Promise ? U : void; diff --git a/packages/winston/src/winston.test.ts b/packages/winston/src/winston.test.ts index 7b8f718..1aa6c5d 100644 --- a/packages/winston/src/winston.test.ts +++ b/packages/winston/src/winston.test.ts @@ -13,11 +13,7 @@ const message = "Something to do with something"; * @param logLevel LogLevel - Logtail log level * @param levels Use custom log levels */ -async function testLevel( - level: string, - logLevel: LogLevel, - levels?: { [key: string]: number }, -) { +async function testLevel(level: string, logLevel: LogLevel, levels?: { [key: string]: number }) { // Sample log const log: LogEntry = { level, diff --git a/packages/winston/src/winston.ts b/packages/winston/src/winston.ts index 3e25087..b275a3e 100644 --- a/packages/winston/src/winston.ts +++ b/packages/winston/src/winston.ts @@ -6,23 +6,11 @@ import { LogLevel, StackContextHint } from "@logtail/types"; const stackContextHint = { fileName: "node_modules/winston", - methodNames: [ - "log", - "error", - "warn", - "info", - "http", - "verbose", - "debug", - "silly", - ], + methodNames: ["log", "error", "warn", "info", "http", "verbose", "debug", "silly"], }; export class LogtailTransport extends Transport { - public constructor( - private _logtail: Logtail, - opts?: Transport.TransportStreamOptions, - ) { + public constructor(private _logtail: Logtail, opts?: Transport.TransportStreamOptions) { super(opts); } @@ -37,12 +25,7 @@ export class LogtailTransport extends Transport { // Determine the log level // Log out to Logtail - void this._logtail.log( - message, - level, - meta, - stackContextHint as StackContextHint, - ); + void this._logtail.log(message, level, meta, stackContextHint as StackContextHint); // Winston callback... cb();