Deprecated: please use https://github.com/Countingup/browser-logging-server and https://github.com/Countingup/browser-logging-client instead.
Sends browser logs from client to node server.
This is useful for retrieving Cypress UI test browser logs.
Any message sent to console.log, console.warn and console.error will also be sent to and logged by the logging server.
To start the server which will listen for logs:
yarn start
...
$ node dist/loggingServer.js
Listening for browser logs on ws://localhost:8888
The client must be initialised in the browser environment. It overrides console.log, console.warn and
console.error sending all messages to the logging server. They are still logged to the browser.
import { initialiseLoggingClient } from "@Countingup/browser-logging";
initialiseLoggingClient();Calling initialiseLoggingClient after it's already initialised has no effect.
Install np - https://github.com/sindresorhus/np:
yarn global add np
Run np and follow instructions.
MIT License.