Skip to content

Commit

Permalink
fixup! pkg/littlefs: make use of RIOT's logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Enoch247 committed Oct 11, 2024
1 parent 8bcc757 commit b187dda
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions pkg/littlefs/lfs_log.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ extern "C" {
/**
* @brief Private macro for routing littlefs log msgs to RIOT's log module.
*
* @param[in] fmt printf style format string
* @param[in] level log level of this log message
* @param[in] fmt printf style format string
* @param[inout] ... printf style variadic args
*/
#define _LFS_LOG(level, fmt, ...)\
Expand All @@ -46,22 +47,25 @@ extern "C" {
* @brief Re-implementation of littlefs's logging and debugging macros.
*/

/** override of littlefs's `LFS_DEBUG()` */
#ifndef LFS_NO_DEBUG
#define LFS_DEBUG(...) _LFS_LOG(LOG_DEBUG, __VA_ARGS__, "")
# define LFS_DEBUG(...) _LFS_LOG(LOG_DEBUG, __VA_ARGS__, "")
#else
#define LFS_DEBUG(...)
# define LFS_DEBUG(...)
#endif

/** override of littlefs's `LFS_WARN()` */
#ifndef LFS_NO_WARN
#define LFS_WARN(...) _LFS_LOG(LOG_WARNING, __VA_ARGS__, "")
# define LFS_WARN(...) _LFS_LOG(LOG_WARNING, __VA_ARGS__, "")
#else
#define LFS_WARN(...)
# define LFS_WARN(...)
#endif

/** override of littlefs's `LFS_ERROR()` */
#ifndef LFS_NO_ERROR
#define LFS_ERROR(...) _LFS_LOG(LOG_ERROR, __VA_ARGS__, "")
# define LFS_ERROR(...) _LFS_LOG(LOG_ERROR, __VA_ARGS__, "")
#else
#define LFS_ERROR(...)
# define LFS_ERROR(...)
#endif

/** @} */
Expand Down

0 comments on commit b187dda

Please sign in to comment.