Skip to content

Implement configurable verbosity logger across Core and Tools modules #50

@ans-4175

Description

@ans-4175

Goal

Replace all console.log and console.error usages in the repository with a custom logger that supports configurable log levels (debug, info, warn, error). Users should be able to set the log verbosity during agent/builder instantiation at runtime. The logger should default to 'warn' and 'error' only, and be exposed to the object instance for further logging. No third-party logging libraries should be used.

Requirements

  • Create a simple logger utility (no dependencies) with log levels: debug, info, warn, error.
  • Provide a way for users to configure the log level at runtime via the builder/agent constructor (default: 'warn' and 'error' only).
  • Expose the logger instance on object instantiation for custom user logging.
  • Replace all direct usages of console.log and console.error in Core and Tools modules with the new logger.
  • Prioritize updates to the core/ and core/tools/ directories.

Code Pointers

Below are relevant code locations where logging is currently used and should be updated:

Core

Tools

Example (for documentation update, less critical)

Acceptance Criteria

  • All direct console logging in prioritized modules is replaced by the custom logger.
  • Log level can be configured at runtime, defaults to 'warn'/'error'.
  • Logger instance is exposed for user access.
  • No third-party logger libraries used.

Example logger usage

const logger = new Logger({ level: 'info' });
logger.debug('message');
logger.warn('warn message');
// ...

References


This issue is a feature request to improve developer experience and production readiness by standardizing and controlling logging output.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requesthacktoberfestHacktoberfest Contribution Open

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions