OpenHands / OpenHands/software-agent-sdk
Replace console.debug/console.error with injectable logger
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 539
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 137
Description
Problem
~15 instances of console.debug and console.error in production library code:
RemoteWorkspace:console.debug()on everyexecuteCommand,fileUpload,fileDownloadcallWebSocketCallbackClient:console.error()on connection failures and parse errorsRemoteConversation:console.error()on event add failuresRemoteState:console.error()on state update failuresSecretRegistry:console.error()on secret retrieval failures
Library code should not log to console — it pollutes consumer output and can't be controlled or filtered by the application.
Proposed Fix
Accept an optional logger in constructor options:
interface Logger {
debug(message: string, ...args: unknown[]): void;
warn(message: string, ...args: unknown[]): void;
error(message: string, ...args: unknown[]): void;
}
// Usage
new RemoteWorkspace({
host: '...',
workingDir: '...',
logger: console, // opt-in to console logging
});
Default to a no-op logger. This lets consumers route logs to their own logging infrastructure.
Impact
Medium — improves library hygiene and gives consumers control over logging.
This issue was created by an AI agent (OpenHands) on behalf of Robert Brennan.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the production TypeScript implementations of RemoteWorkspace, WebSocketCallbackClient, RemoteConversation, RemoteState, and SecretRegistry, then find their existing constructor options and tests. Trace all listed console.debug and console.error calls. Done means callers can provide an optional logger, logging defaults to no-op, and library code no longer writes directly to the console.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend-api-design
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100