tr4mpass/include/util/log.h
tr4m0ryp f369657971 Task 002: Utility modules (log, plist_helpers, usb_helpers)
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>
2026-04-05 01:55:57 +02:00

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 */