2 Commits

Author SHA1 Message Date
anth64 3f7f216c92 chore: bump version to 0.1.1 and update documentation 2026-02-14 17:25:20 +01:00
anth64 70d50dda92 fix(logging): correct log level severity order
Reverse enum so lower values = less severe, higher = more severe.
This makes the filter check (level < min_log_level) work correctly.

- DEBUG (0) - least severe, filtered by default
- INFO (1) - default minimum level
- WARN (2) - warnings and above
- ERROR (3) - most severe, always shown

Fixes incorrect filtering where ERROR/WARN were being blocked.
2026-02-14 17:22:39 +01:00
4 changed files with 15 additions and 6 deletions
+10 -1
View File
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
## [0.1.1] - 2026-02-15
### Fixed
- **Logging**: Corrected log level severity order in enum
- Reversed order so DEBUG (0) < INFO (1) < WARN (2) < ERROR (3)
- Fixes filtering logic where ERROR/WARN were incorrectly blocked
- Default INFO level now properly shows INFO, WARN, and ERROR while filtering DEBUG
## [0.1.0] - 2026-02-15 ## [0.1.0] - 2026-02-15
### Fixed ### Fixed
@@ -84,7 +92,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Dependency management and versioning not yet implemented - Dependency management and versioning not yet implemented
- API is unstable and subject to change in future releases - API is unstable and subject to change in future releases
[Unreleased]: https://github.com/anth64/stk/compare/v0.1.0...HEAD [Unreleased]: https://github.com/anth64/stk/compare/v0.1.1...HEAD
[0.1.1]: https://github.com/anth64/stk/releases/tag/v0.1.1
[0.1.0]: https://github.com/anth64/stk/releases/tag/v0.1.0 [0.1.0]: https://github.com/anth64/stk/releases/tag/v0.1.0
[0.0.4]: https://github.com/anth64/stk/releases/tag/v0.0.4 [0.0.4]: https://github.com/anth64/stk/releases/tag/v0.0.4
[0.0.3]: https://github.com/anth64/stk/releases/tag/v0.0.3 [0.0.3]: https://github.com/anth64/stk/releases/tag/v0.0.3
+1 -1
View File
@@ -182,7 +182,7 @@ stk_init();
## Project Status ## Project Status
**Current Version:** 0.1.0 (Pre-release) **Current Version:** 0.1.1 (Pre-release)
This release brings C89 compliance fixes and a complete logging system rewrite with levels, timestamps, and runtime configuration. This release brings C89 compliance fixes and a complete logging system rewrite with levels, timestamps, and runtime configuration.
+3 -3
View File
@@ -8,10 +8,10 @@ extern "C" {
#endif #endif
typedef enum { typedef enum {
STK_LOG_ERROR, STK_LOG_DEBUG,
STK_LOG_WARN,
STK_LOG_INFO, STK_LOG_INFO,
STK_LOG_DEBUG STK_LOG_WARN,
STK_LOG_ERROR
} stk_log_level_t; } stk_log_level_t;
void stk_set_log_output(FILE *fp); void stk_set_log_output(FILE *fp);
+1 -1
View File
@@ -3,7 +3,7 @@
#define STK_VERSION_MAJOR 0 #define STK_VERSION_MAJOR 0
#define STK_VERSION_MINOR 1 #define STK_VERSION_MINOR 1
#define STK_VERSION_PATCH 0 #define STK_VERSION_PATCH 1
#define STK_STRINGIFY_HELPER(x) #x #define STK_STRINGIFY_HELPER(x) #x
#define STK_STRINGIFY(x) STK_STRINGIFY_HELPER(x) #define STK_STRINGIFY(x) STK_STRINGIFY_HELPER(x)