Skip to content

Issue 2: Logger Module Implementation #14

Description

@adithya1012

Description:
Port logger.js to Python, creating a centralized logging utility compatible with Python's logging module.

Acceptance Criteria:

  • Create src/indexedcp/logger.py
  • Implement create_logger(name, level) function
  • Support standard Python log levels (DEBUG, INFO, WARNING, ERROR, CRITICAL)
  • Add prefix support for module identification
  • Write unit tests in tests/test_logger.py
  • Add docstrings with type hints
  • Ensure DRY - single logging configuration

Technical Details:

  • Use Python's built-in logging module
  • Return configured logger instances
  • Support custom formatters
  • Compatible with both console and file outputs

Example Usage:

from indexedcp.logger import create_logger

logger = create_logger("IndexedCP.Client", level="INFO")
logger.info("Client initialized")

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions