From 7c8dd2672337a760477049e9f6196054332e4f5a Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Sat, 15 Apr 2017 16:34:39 -0400 Subject: Logging infrastructure. --- hal_internal.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'hal_internal.h') diff --git a/hal_internal.h b/hal_internal.h index 1822781..f17179c 100644 --- a/hal_internal.h +++ b/hal_internal.h @@ -98,6 +98,18 @@ extern void hal_critical_section_end(void); extern void hal_ks_lock(void); extern void hal_ks_unlock(void); +/* + * Logging. + */ + + +typedef enum { + HAL_LOG_DEBUG, HAL_LOG_INFO, HAL_LOG_WARN, HAL_LOG_ERROR, HAL_LOG_SILENT +} hal_log_level_t; + +extern void hal_log_set_level(const hal_log_level_t level); +extern void hal_log(const hal_log_level_t level, const char *format, ...); + /* * Dispatch structures for RPC implementation. * -- cgit v1.2.3