Commit Graph

3 Commits

Author SHA1 Message Date
User
900bdeaf79 Implement error handling and structured logging
- Add structured logging with zap library (internal/utils/logger.go)
  - Support for Debug, Info, Warn, Error, Fatal log levels
  - JSON format for file logs, console format for stdout
  - Logs written to .onx/logs/onx.log
  - Configurable log levels and output modes

- Create comprehensive error types (internal/errors/errors.go)
  - OnyxError struct with Code, Message, Cause, and Hint fields
  - Error codes for all major error categories
  - Helper constructors for common errors
  - Recovery hints for better user experience

- Add panic recovery mechanisms to daemon (internal/daemon/daemon.go)
  - Wrap main event loop with panic recovery
  - Graceful degradation on partial failures
  - Detailed error logging with stack traces
  - Recovery wrapper for snapshot creation
  - Replace standard log package with structured logging

This implements items 44-46 from the checklist.
2025-10-15 19:32:41 -04:00
User
d853316272 Initial commit 2025-10-15 19:19:52 -04:00
ffa434630f temp for tree extraction 2025-10-15 19:19:52 -04:00