Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Basic Logging System using zap/zerolog #25

Open
7 tasks
rtb-12 opened this issue Dec 16, 2024 · 0 comments
Open
7 tasks

Add Basic Logging System using zap/zerolog #25

rtb-12 opened this issue Dec 16, 2024 · 0 comments
Labels
enhancement New feature or request maybe hard if a implementation is good you will get hard points medium Oh you have some experience with programming huh! Come on solve this then

Comments

@rtb-12
Copy link
Collaborator

rtb-12 commented Dec 16, 2024

Add basic logging to track core operations and errors in Memoria using a structured logging library.

Required Logging Points

  1. Core Operations in memoria.go:
    • Read/Write operations
    • Cache hits/misses
    • File operations
    • Error conditions

Implementation Details
Add logger to the Memoria struct:

type Options struct {
    // existing fields
    Logger Logger // Interface for logging
}

type Logger interface {
    Info(msg string, fields ...Field)
    Error(msg string, fields ...Field)
}

Learning Resources

  1. Go zap logger
  2. Zerolog docs

Tasks

  • Add logger interface
  • Implement basic logging in:
    • Read
    • Write
  • cache.go operations
  • Add configuration options
  • Update documentation
@0xnullifier 0xnullifier added enhancement New feature or request medium Oh you have some experience with programming huh! Come on solve this then maybe hard if a implementation is good you will get hard points labels Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request maybe hard if a implementation is good you will get hard points medium Oh you have some experience with programming huh! Come on solve this then
Projects
None yet
Development

No branches or pull requests

2 participants