Page MenuHomePhabricator

[Cashtab] Replace all console.log statements with error or info and remove debug logs
ClosedPublic

Authored by bytesofman on Mar 29 2024, 14:13.

Details

Summary

T3485

In this way, we can use console.log for debug logs -- then quickly test if any debug logs are remaining.

This diff also removes some lingering debug logs from various places in the app.

Test Plan

grep -r console.log src/ -- still a few left, but they are removed in D15804

Diff Detail

Repository
rABC Bitcoin ABC
Branch
cashtab-no-console-logs
Lint
Lint Errors
SeverityLocationCodeMessage
Errorcashtab/src/components/Common/WalletLabel.js:55ESLINTno-unused-vars
Unit
No Test Coverage
Build Status
Buildable 28163
Build 55871: Build Diffcashtab-tests
Build 55870: arc lint + arc unit

Event Timeline

bytesofman retitled this revision from [Cashtab] Replace all console.log statements with error or info to [Cashtab] Replace all console.log statements with error or info and remove debug logs.Mar 29 2024, 14:19
bytesofman edited the summary of this revision. (Show Details)

Tail of the build log:

Installing mock-chronik-client dependencies...
/work/modules/mock-chronik-client /work/abc-ci-builds/cashtab-tests

added 236 packages, and audited 237 packages in 2s

35 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
/work/cashtab /work/modules/mock-chronik-client /work/abc-ci-builds/cashtab-tests

added 1718 packages, and audited 1719 packages in 31s

262 packages are looking for funding
  run `npm fund` for details

1 moderate severity vulnerability

To address all issues, run:
  npm audit fix

Run `npm audit` for details.

> cashtab@2.9.0 build
> node scripts/build.js

Creating an optimized production build...
Failed to compile.

[eslint] 
src/components/Common/WalletLabel.js
  Line 55:15:  'walletName' is assigned a value but never used  no-unused-vars

Search for the keywords to learn more about each error.


Build cashtab-tests failed with exit code 1

Tail of the build log:

Installing mock-chronik-client dependencies...
/work/modules/mock-chronik-client /work/abc-ci-builds/cashtab-tests

added 236 packages, and audited 237 packages in 2s

35 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
/work/cashtab /work/modules/mock-chronik-client /work/abc-ci-builds/cashtab-tests

added 1718 packages, and audited 1719 packages in 31s

262 packages are looking for funding
  run `npm fund` for details

1 moderate severity vulnerability

To address all issues, run:
  npm audit fix

Run `npm audit` for details.

> cashtab@2.9.0 build
> node scripts/build.js

Creating an optimized production build...
Failed to compile.

[eslint] 
src/components/Common/WalletLabel.js
  Line 55:15:  'walletName' is assigned a value but never used  no-unused-vars

Search for the keywords to learn more about each error.


Build cashtab-tests failed with exit code 1

fixed in rebase

emack requested changes to this revision.EditedMar 30 2024, 07:25
emack added a subscriber: emack.

grep -r console.log src/ -- still a few left, but they are removed in D15804

Still seeing two remaining in useImage even though D15804 has since landed

image.png (45×572 px, 12 KB)

This revision now requires changes to proceed.Mar 30 2024, 07:25

grep -r console.log src/ -- still a few left, but they are removed in D15804

Still seeing two remaining in useImage even though D15804 has since landed

image.png (45×572 px, 12 KB)

ok I can see this being removed in an unrelated diff D15818

This revision is now accepted and ready to land.Mar 30 2024, 07:29