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

v0.3.0 #26

Merged
merged 25 commits into from
Feb 5, 2025
Merged

v0.3.0 #26

merged 25 commits into from
Feb 5, 2025

Conversation

chrischtel
Copy link
Owner

No description provided.

chrischtel and others added 25 commits January 29, 2025 15:15
…res (#14)

### TL;DR
Removed pattern recognition functionality and examples from the codebase.

### What changed?
- Deleted `pattern_recognition.zig` example file
- Removed empty correlator and predictor files
- Moved `patterns.zig` to `analysis_canceled` directory
- Commented out pattern analysis exports and functionality in `nexlog.zig`

### How to test?
1. Verify that pattern recognition imports no longer work
2. Ensure core logging functionality remains unaffected
3. Confirm that building the project succeeds without pattern recognition features

### Why make this change?
The pattern recognition feature was likely either unstable, unused, or being redesigned. Moving it to a canceled directory and removing exports suggests this functionality is being temporarily shelved or will be reimplemented differently in the future.
### TL;DR
Improved network connection error handling and logging in the network handler.

### What changed?
- Modified `ensureConnection` to return a `Stream` instead of an optional `Stream`
- Replaced `null` return with a specific `ReconnectPending` error
- Added detailed error logging when connection attempts fail
- Added warning log when SSL is not implemented and connection needs to be closed

### How to test?
1. Attempt to connect to an unavailable endpoint and verify error logs
2. Try connecting with SSL enabled to verify warning message
3. Verify connection retry behavior when a server is temporarily unavailable

### Why make this change?
To provide better visibility into connection issues through detailed logging and more specific error handling, making it easier to diagnose network-related problems during development and production.
### TL;DR
Added network output handler with test coverage for initialization and deinitialization

### What changed?
- Added network module export in nexlog.zig
- Implemented test case for NetworkHandler initialization in network.zig
- Created new network_tests.zig file with comprehensive handler testing
- Added validation for endpoint configuration and buffer initialization

### How to test?
1. Run the test suite using `zig test`
2. Verify NetworkHandler initialization with example.com:8080
3. Check buffer size and endpoint configuration assertions
4. Confirm proper deinitialization of resources

### Why make this change?
To ensure the network output handler is properly tested and validated, providing confidence in its initialization, configuration handling, and resource management. This is crucial for maintaining reliability when sending logs over network connections.
e### TL;DR
Temporarily disabled pattern tests by commenting out all test cases

### What changed?
Commented out all pattern analysis test cases in `pattern_tests.zig`, including tests for:
- Basic type detection
- Similarity matching
- Variable detection
- Cleanup and limits
- Metadata tracking
- Concurrent access
- Custom pattern types
- Auto categorization and variable rules

### How to test?
1. Verify that running `zig test` skips these pattern tests
2. Confirm no regressions in other test suites
3. Ensure test file still exists but tests are properly commented out

### Why make this change?
These tests are likely being temporarily disabled to:
- Allow for refactoring of the pattern analysis system
- Prevent test failures during architectural changes
- Provide a clean slate for implementing new pattern matching logic

The commented state preserves the test cases for future re-enablement once the underlying implementation is ready.
…ore... / for the json logger handler (#18)

### TL;DR
Added JSON logging capabilities to the nexlog library with file output support and JSON serialization utilities.

### What changed?
- Introduced a new `JsonHandler` for structured JSON log output
- Added JSON serialization utilities for log entries
- Created JSON value types and error handling
- Added file output support for JSON logs with proper formatting
- Implemented initialization and cleanup procedures for JSON handlers
- Added comprehensive test coverage for JSON logging functionality

### How to test?
1. Run the new example in `examples/json_logging.zig`
2. Check the generated JSON log file in `test_logs/app.json`
3. Execute the test suite in `tests/json_handler_tests.zig`
4. Verify JSON output formatting and structure
5. Test different log levels and metadata handling

### Why make this change?
JSON logging is essential for modern applications that require structured logging for better log aggregation, parsing, and analysis. This addition enables integration with log management systems and provides a standardized format for log processing.
FORMAT module utility

WIP: fixed errors, conversion and shadowing errors

WIP: implemented formatting into existing configuration
@chrischtel chrischtel merged commit f33481c into master Feb 5, 2025
2 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant