Implemented three foundational utility modules: - log: leveled logging with ANSI colors to stderr - plist_helpers: libplist convenience wrappers for dict access and XML serialization (renamed plist_dict_get_bool_val/plist_dict_get_uint_val to avoid collision with libplist 2.x native symbols plist_dict_get_bool/plist_dict_get_uint) - usb_helpers: libusb control transfer wrappers for DFU operations Files created: - include/util/log.h, src/util/log.c - include/util/plist_helpers.h, src/util/plist_helpers.c - include/util/usb_helpers.h, src/util/usb_helpers.c Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
17 lines
330 B
C
17 lines
330 B
C
#ifndef LOG_H
|
|
#define LOG_H
|
|
|
|
typedef enum {
|
|
LOG_DEBUG = 0,
|
|
LOG_INFO,
|
|
LOG_WARN,
|
|
LOG_ERROR
|
|
} log_level_t;
|
|
|
|
void log_set_level(log_level_t level);
|
|
void log_debug(const char *fmt, ...);
|
|
void log_info(const char *fmt, ...);
|
|
void log_warn(const char *fmt, ...);
|
|
void log_error(const char *fmt, ...);
|
|
|
|
#endif /* LOG_H */
|