layer5io / layer5io/layer5

[Chore] Remove leftover debug `console.log` statements shipped to production

Open Beginner friendly
#7,993 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.1k
Forks
1.6k
Avg merge
2d 10h
Merged PRs (30d)
18

Description

Description

Debug logging left in component code runs in the production bundle and writes to every visitor's browser console.

1. src/components/SistentNavigation/intra-page.js:68

const anchors = document.querySelectorAll(".main-content > a");
console.log(anchors);

IntraPage is rendered by SistentLayout, so this logs a NodeList on every Sistent documentation page load.

2. src/sections/Learn-Layer5/Course-Overview/index.js:165-169

{console.log(
  "lenght of the service mesh array: ",
  availableServiceMeshes.length,
)}
{console.log("array: ", availableServiceMeshes)}

Two logs embedded directly in JSX, so they fire on every render of the course overview page. (Note the lenght typo in the log text.) Because console.log returns undefined, these expressions render nothing — they are purely debug output.

3. src/sections/Home/So-Special-Section/index.js:124-125

Commented-out console.log calls that can be deleted as part of the same cleanup.

Expected Behavior

No debug logging in the production bundle. The three sites above should be removed. Genuine error reporting in catch blocks (e.g. CatalogGrid.js:29, Features-Col/index.js:80) is intentional and should stay, though console.error would be more appropriate than console.log for those.

Please note: src/sections/Projects/Sistent/getting-started/usage/index.js:95 also contains console.log('Form submitted:', formData), but that line lives inside a documentation code-sample string shown to readers as example code. It is not a bug and should be left alone.

Screenshots

N/A — open any Sistent component docs page with devtools and observe the logged NodeList.

Environment:
  • Host OS: any
  • Browser: any

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 with the three locations named in the issue: src/components/SistentNavigation/intra-page.js, src/sections/Learn-Layer5/Course-Overview/index.js, and src/sections/Home/So-Special-Section/index.js. Remove only the listed debug logging, leave intentional catch-block reporting and the documentation code-sample console.log unchanged, then verify the three production sites no longer emit debug output.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.