socketio / socketio/socket.io

Enable logging in Angular

Open
#5,351 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
63.2k
Forks
10.3k
Avg merge
11d 20h
Merged PRs (30d)
2

Description

Hi,

it seems that the logging only can be enabled, when socket.io-client is running on a node instance. If I use socket.io-client in my Angular application and run

localStorage.debug = '*';

no output is logged to the console after reloading the browser.

Is there would be a possibility, to pass your own debug logging instance to the client, this would help solving the issue, as I tried to set up debug 4.3.1 in my angular application and could use it for my own output, but not the output of the socket.io-client, since I cannot pass the instance.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining how socket.io-client initializes its browser logging and how Angular applications handle localStorage.debug after a reload. Compare that behavior with the attempted debug 4.3.1 setup; done means client output is visible in the Angular browser context or a supported way to provide a custom logging instance is clearly available.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend, observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.