neurolink
neurolink copied to clipboard
PC-015: Logging Levels Inconsistent
Bug Summary
Different providers use different log levels for the same operations. No logging guidelines exist.
Root Cause
No standardized logging conventions. Each provider logs based on preference.
Affected Providers
All providers
Current Behavior
- Some log routine operations at INFO (noisy)
- Others use DEBUG (correct)
- Error logging varies (WARN vs ERROR)
- No guidelines for contributors
Expected Behavior
Standardized logging patterns:
- DEBUG: Routine operations, request details
- INFO: Significant events (generation complete)
- WARN: Recoverable issues, retries
- ERROR: Failures, exceptions
- Structured logging (object, not string)
- No sensitive data
Implementation
Create docs/contributing/logging-guidelines.md:
```markdown
Logging Guidelines
Log Levels
DEBUG
- Request construction
- API call details
- Internal state changes
INFO
- Generation started/completed
- Tool calls executed
- Configuration changes
WARN
- Retry attempts
- Fallback behavior
- Deprecated features
ERROR
- API failures
- Invalid configuration
- Exceptions
Format Standards
✅ Good: \`\`\`typescript logger.info("Generation complete", { provider: this.providerName, tokensUsed: tokens, }); \`\`\`
❌ Bad: \`\`\`typescript logger.info(\`Complete: \${tokens} tokens\`); \`\`\`
Sensitive Data
NEVER log:
- API keys
- User data
- Authentication tokens ```
Acceptance Criteria
- Guidelines documented
- All providers reviewed
- Consistent levels used
- Structured logging
- No sensitive data
- CONTRIBUTING.md updated
Priority
Low - Code quality improvement
Effort
2 hours