From 70e9ec2fc33998860a8c91edf164253f1a79d838 Mon Sep 17 00:00:00 2001 From: anth64 Date: Sat, 14 Feb 2026 17:06:50 +0100 Subject: [PATCH] chore: bump version to 0.1.0 and update documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Update stk_version.h: 0.0.4 → 0.1.0 - Add CHANGELOG entry for 0.1.0 release - C89 compliance fixes - Flags bitfield system - Enhanced logging system - Update README project status and API reference - Document new logging functions and configuration --- CHANGELOG.md | 35 ++++++++++++++++++++++++++++++++++- README.md | 19 ++++++++++++++----- include/stk_version.h | 4 ++-- 3 files changed, 50 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0910642..675be36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,37 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.1.0] - 2026-02-15 + +### Fixed +- **C89 Compliance**: Removed stdint.h dependency (C99 feature) + - Replaced all uint8_t with unsigned char throughout codebase + - Ensures strict C89 compliance for maximum portability + +### Added +- **Flags system**: Centralized bitfield for boolean state and settings + - Replaces stk_initialized with stk_flags for efficient memory usage + - Single byte packs all boolean flags (STK_FLAG_INITIALIZED, STK_FLAG_LOGGING_ENABLED) + - Runtime-changeable logging control via stk_set_logging_enabled() + +- **Enhanced logging system**: Complete rewrite with modern features + - Log levels: ERROR, WARN, INFO, DEBUG with runtime filtering + - Timestamps: yyyy-mm-dd HH:MM:SS.mmm format (platform-specific implementation) + - Configurable log output stream (stk_set_log_output) + - Configurable log prefix (stk_set_log_prefix, defaults to "stk") + - Configurable minimum log level (stk_set_log_level, defaults to INFO) + - Platform abstraction for timestamps (GetLocalTime on Windows, gettimeofday on POSIX) + +### Changed +- **BREAKING**: stk_log() signature changed from stk_log(FILE *fp, ...) to stk_log(stk_log_level_t level, ...) +- **BREAKING**: All uint8_t types replaced with unsigned char +- All internal STK messages now use appropriate log levels +- Setting log output to NULL disabls logging + +### Notes +- This release completes Phase 1 logging improvements +- Dependency management still in progress for Phase 1 completion + ## [0.0.4] - 2026-02-11 ### Fixed @@ -53,7 +84,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Dependency management and versioning not yet implemented - API is unstable and subject to change in future releases -[Unreleased]: https://github.com/anth64/stk/compare/v0.0.3...HEAD +[Unreleased]: https://github.com/anth64/stk/compare/v0.1.0...HEAD +[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.3]: https://github.com/anth64/stk/releases/tag/v0.0.3 [0.0.2]: https://github.com/anth64/stk/releases/tag/v0.0.2 [0.0.1]: https://github.com/anth64/stk/releases/tag/v0.0.1 diff --git a/README.md b/README.md index fd3618d..895e967 100644 --- a/README.md +++ b/README.md @@ -169,22 +169,31 @@ stk_init(); - `void stk_set_module_init_fn(const char *name)` - Set module init function name - `void stk_set_module_shutdown_fn(const char *name)` - Set module shutdown function name +#### Logging +- `void stk_set_logging_enabled(unsigned char enabled)` - Enable/disable all logging +- `unsigned char stk_is_logging_enabled(void)` - Query logging state +- `void stk_set_log_output(FILE *fp)` - Set log output stream (default: stdout, NULL disables) +- `void stk_set_log_prefix(const char *prefix)` - Set log prefix (default: "stk") +- `void stk_set_log_level(stk_log_level_t level)` - Set minimum log level (default: INFO) + +**Log Levels:** `STK_LOG_ERROR`, `STK_LOG_WARN`, `STK_LOG_INFO`, `STK_LOG_DEBUG` + --- ## Project Status -**Current Version:** 0.0.4 (Pre-release) +**Current Version:** 0.1.0 (Pre-release) -This is a bugfix release completing the Linux hot-reload stability improvements. Phase 1 is still in progress. +This release brings C89 compliance fixes and a complete logging system rewrite with levels, timestamps, and runtime configuration. ### What Works - Cross-platform module loading and hot-reloading - File watching (inotify/kqueue/FindFirstFile) -- Basic error handling -- Robust hot-reload even during extremely rapid file changes (Linux fixes in 0.0.2-0.0.4) +- Robust hot-reload even during extremely rapid file changes +- Enhanced logging with levels, timestamps, and filtering +- Runtime-configurable logging behavior ### In Progress (Phase 1) -- Complete logging system (log levels, verbosity, output configuration) - Module metadata (name, version, description) - Dependency management and versioning diff --git a/include/stk_version.h b/include/stk_version.h index ddba796..41949e7 100644 --- a/include/stk_version.h +++ b/include/stk_version.h @@ -2,8 +2,8 @@ #define STK_VERSION_H #define STK_VERSION_MAJOR 0 -#define STK_VERSION_MINOR 0 -#define STK_VERSION_PATCH 4 +#define STK_VERSION_MINOR 1 +#define STK_VERSION_PATCH 0 #define STK_STRINGIFY_HELPER(x) #x #define STK_STRINGIFY(x) STK_STRINGIFY_HELPER(x)