Skip to content

fix: Replace console.log() with debug library in HTTPFileLoader#1125

Merged
mttrbrts merged 1 commit intoaccordproject:mainfrom
23harshitkumar:fix/remove-url-request-logging
Feb 13, 2026
Merged

fix: Replace console.log() with debug library in HTTPFileLoader#1125
mttrbrts merged 1 commit intoaccordproject:mainfrom
23harshitkumar:fix/remove-url-request-logging

Conversation

@23harshitkumar
Copy link
Contributor

Problem

The HTTPFileLoader.load() method in concerto-util uses console.log() to output the request URL during file loading. This causes unwanted console spam , security concerns (URLs may contain sensitive paths) and takes up unnecessary terminal space.

Solution

Replace console.log(requestUrl) with debug('loading', requestUrl) , utilizing the debug library that is already imported in the file concerto-util

Changes:

File: packages/concerto-util/lib/loaders/httpfileloader.js
Line 17: added debug import (const debug = require('debug')('concerto:HTTPFileLoader');)
Line 60: Changed console.log(requestUrl);debug('loading', requestUrl);

Why these changes were required:

  • Prevents unwanted console spam for library users
  • Gives users control over logging via debug
  • Cleaner and silent production output - logs only appear when explicitly enabled
  • Consistent - follows existing debug patterns in concerto-util

Testing

  • All existing tests pass
  • Linting passes

Signed-off-by: Harshit Kumar <10harshitkumar@gmail.com>
@23harshitkumar 23harshitkumar changed the title fix: Replace console.log with debug in HTTPFileLoader fix: Replace console.log() with debug in HTTPFileLoader Jan 30, 2026
@23harshitkumar 23harshitkumar changed the title fix: Replace console.log() with debug in HTTPFileLoader fix: Replace console.log() with debug library in HTTPFileLoader Jan 30, 2026
@23harshitkumar
Copy link
Contributor Author

@ekarademir @dselman @mttrbrts a review will be appreciated!

Copy link
Member

@mttrbrts mttrbrts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. Can you port this change to the v4.0.0 branch too, please?

@mttrbrts mttrbrts enabled auto-merge (squash) February 13, 2026 22:23
@mttrbrts mttrbrts merged commit 6984da9 into accordproject:main Feb 13, 2026
13 checks passed
@23harshitkumar
Copy link
Contributor Author

Yes sure @mttrbrts, I'd be happy to do so!

@23harshitkumar
Copy link
Contributor Author

@mttrbrts I've backported this change to the v4.0.0 branch in PR #1131. Let me know if that looks correct to you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants