Skip to content

Simple console override for sending logs to a websocket server.

Notifications You must be signed in to change notification settings

xhudaman/ws-console

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ws-console

Console override for sending logs to a websocket server.

How to use

Installation

pnpm

  pnpm add @xhudaman/ws-console

npm

  npm i -s @xhudaman/ws-console

yarn

  yarn add @xhudaman/ws-console

Example Usage

import WSConsole from "@xhudaman/ws-console";

const wsConsole = WSConosle({
  // Use the address of your debug server if it differs from the example
  debugServerUrl: "ws://localhost:3001",
  enableInProduction: true,
});

Configuration

Key Required Default Value Accepted Values
debugServerUrl true N/A Any valid WebSocket URL. For example: ws://domain:port or wss://domain:port
enableInProduction false false true or false
enableConsoleOverrides false true true or false
disablePassthroughToNativeConsole false false true or false

Warning: If you are using this package on the Switch in the skyline-web browser, you must set disablePassthroughToNativeConsole to true or it will block the remainder of the code running in the same scope.

About

Simple console override for sending logs to a websocket server.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published