Home Reference Source
import HTTPS from 'timber/src/transports/https.js'
public class | source

HTTPS

Extends:

stream~Writable → HTTPS

A highly efficient stream for sending logs to Timber via HTTPS. It uses batches, keep-alive connections (and in the future maybe msgpack) to deliver logs with high-throughput and little overhead. It also implements the Stream.Writable interface so that it can be treated like a stream. This is beneficial when using something like Morgan, where you can pass a custom stream.

Constructor Summary

Public Constructor
public

constructor(apiKey: string, options: Object)

Member Summary

Public Members
public
public

apiKey: *

public
public
public
public
public

path: *

public

port: *

Public Constructors

public constructor(apiKey: string, options: Object) source

Params:

NameTypeAttributeDescription
apiKey string

Timber API Key

options Object
  • optional

Various options to adjust the stream behavior.

options.flushInterval string
  • optional
  • default: 1000

How often, in milliseconds, the messages written to the stream should be delivered to Timber.

options.httpsAgent string
  • optional

Your own custom https.Agent. We use agents to maintain connection pools and keep the connections alive. This avoids the initial connection overhead every time we want to communicate with Timber. See https.Agent for options.

Public Members

public acceptsObject: boolean source

public apiKey: * source

public flushInterval: * source

public hostName: * source

public httpsAgent: * source

public httpsClient: * source

public path: * source

public port: * source