Connects to a remote socket.io server and logs messages to it.

In the root of the Git repository, there is a simple example server that listens for these messages and logs them to the local console.

Implements

Methods

Constructors

Properties

Methods

  • Returns an existing RemoteConsole for the given URL and timeout or creates a new one.

    If a new one is created, it will be saved for later reuse.

    Parameters

    • url: string

      The URL of the remote logger.

    • OptionalconnectTimeout: number = DEFAULT_TIMEOUT

      The timeout in ms for a remote connection to be considered failed. Default is 1500.

    Returns RemoteConsole

Constructors

Properties

Emits a message with ID console.debug.

destroy: () => void

Disconnects and destroys the RemoteConsole. Cannot be undone.

Emits a message with ID console.error.

hasFailed: () => boolean

Returns true if the client has been disconnected for more than the connect timeout.

Emits a message with ID console.info.

Emits a message with ID console.log.

Emits a message with ID console.warn.