pino-logflare
Advanced tools
Comparing version 0.3.7-4f99496c to 0.3.7-94e296a3
/// <reference types="node" /> | ||
import createHttpWriteStream from "./httpStream"; | ||
import createConsoleWriteStream from "./consoleStream"; | ||
import { pinoBrowserLogEventI } from "./utils"; | ||
import { LogEvent } from "./utils"; | ||
import { LogflareUserOptionsI } from "logflare-transport-core"; | ||
declare const createPinoBrowserSend: (options: LogflareUserOptionsI) => (level: string, logEvent: pinoBrowserLogEventI) => void; | ||
declare const createPinoBrowserSend: (options: LogflareUserOptionsI) => (level: string, logEvent: LogEvent) => void; | ||
declare const logflarePinoVercel: (options: LogflareUserOptionsI) => { | ||
stream: import("stream").Writable; | ||
send: (level: string, logEvent: pinoBrowserLogEventI) => void; | ||
send: (level: string, logEvent: LogEvent) => void; | ||
}; | ||
declare const createWriteStream: typeof createHttpWriteStream; | ||
export { createWriteStream, logflarePinoVercel, createPinoBrowserSend, createConsoleWriteStream, createHttpWriteStream }; | ||
export { createWriteStream, logflarePinoVercel, createPinoBrowserSend, createConsoleWriteStream, createHttpWriteStream, }; |
@@ -24,7 +24,6 @@ "use strict"; | ||
var logflare_transport_core_1 = require("logflare-transport-core"); | ||
var isBrowser = typeof window !== 'undefined' | ||
&& typeof window.document !== 'undefined'; | ||
var isNode = typeof process !== 'undefined' | ||
&& process.versions != null | ||
&& process.versions.node != null; | ||
var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; | ||
var isNode = typeof process !== "undefined" && | ||
process.versions != null && | ||
process.versions.node != null; | ||
var createPinoBrowserSend = function (options) { | ||
@@ -31,0 +30,0 @@ var client = new logflare_transport_core_1.LogflareHttpClient(__assign(__assign({}, options), { fromBrowser: true })); |
import { LogflareUserOptionsI } from "logflare-transport-core"; | ||
interface pinoBrowserLogEventI { | ||
declare type Level = "fatal" | "error" | "warn" | "info" | "debug" | "trace"; | ||
declare type SerializerFn = (value: any) => any; | ||
interface Bindings { | ||
level?: Level | string; | ||
serializers?: { | ||
[key: string]: SerializerFn; | ||
}; | ||
[key: string]: any; | ||
} | ||
interface LogEvent { | ||
ts: number; | ||
messages: string[]; | ||
bindings: object[]; | ||
messages: any[]; | ||
bindings: Bindings[]; | ||
level: { | ||
label: string; | ||
value: number; | ||
label: string; | ||
}; | ||
} | ||
declare const formatPinoBrowserLogEvent: (logEvent: pinoBrowserLogEventI) => { | ||
declare const formatPinoBrowserLogEvent: (logEvent: LogEvent) => { | ||
metadata: { | ||
@@ -22,2 +31,2 @@ url: string; | ||
declare function toLogEntry(item: Record<string, any>): Record<string, any>; | ||
export { toLogEntry, formatPinoBrowserLogEvent, pinoBrowserLogEventI, addLogflareTransformDirectives, }; | ||
export { toLogEntry, formatPinoBrowserLogEvent, LogEvent, addLogflareTransformDirectives, }; |
{ | ||
"name": "pino-logflare", | ||
"version": "0.3.7-4f99496c", | ||
"version": "0.3.7-94e296a3", | ||
"description": "A transport for Pino that sends messages to Logflare", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/logflare/pino-logflare", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
27152
369