Loading...
Searching...
No Matches

littlefs v2 logging macro overrides More...

Detailed Description

littlefs v2 logging macro overrides

This header provides re-implementations of the logging and debugging macros used in littlefs. This is to allow the package to make use of RIOT's own modules for logging and debugging.

Author
Joshua DeWeese josh..nosp@m.dewe.nosp@m.ese@g.nosp@m.mail.nosp@m..com

Definition in file lfs_log.h.

#include "log.h"
#include "debug.h"
+ Include dependency graph for lfs_log.h:

Go to the source code of this file.

#define _LFS_TRACE(fmt, ...)    DEBUG("%s:%d: " fmt "%s\n", __FILE__, __LINE__, __VA_ARGS__)
 Private macro for routing littlefs trace msgs to RIOT's DEBUG macro.
 
#define _LFS_LOG(level, fmt, ...)    LOG(level, "lfs: " fmt "%s\n", __VA_ARGS__)
 Private macro for routing littlefs log msgs to RIOT's log module.
 

littlefs overrides

Re-implementation of littlefs's logging and debugging macros.

#define LFS_TRACE(...)
 override of littlefs's LFS_TRACE()
 
#define LFS_DEBUG(...)   _LFS_LOG(LOG_DEBUG, __VA_ARGS__, "")
 override of littlefs's LFS_DEBUG()
 
#define LFS_WARN(...)   _LFS_LOG(LOG_WARNING, __VA_ARGS__, "")
 override of littlefs's LFS_WARN()
 
#define LFS_ERROR(...)   _LFS_LOG(LOG_ERROR, __VA_ARGS__, "")
 override of littlefs's LFS_ERROR()
 

Macro Definition Documentation

◆ _LFS_LOG

#define _LFS_LOG (   level,
  fmt,
  ... 
)     LOG(level, "lfs: " fmt "%s\n", __VA_ARGS__)

Private macro for routing littlefs log msgs to RIOT's log module.

Parameters
[in]levellog level of this log message
[in]fmtprintf style format string
[in,out]...printf style variadic args

Definition at line 54 of file lfs_log.h.

◆ _LFS_TRACE

#define _LFS_TRACE (   fmt,
  ... 
)     DEBUG("%s:%d: " fmt "%s\n", __FILE__, __LINE__, __VA_ARGS__)

Private macro for routing littlefs trace msgs to RIOT's DEBUG macro.

Parameters
[in]fmtprintf style format string
[in,out]...printf style variadic args

Definition at line 44 of file lfs_log.h.

◆ LFS_DEBUG

#define LFS_DEBUG (   ...)    _LFS_LOG(LOG_DEBUG, __VA_ARGS__, "")

override of littlefs's LFS_DEBUG()

Definition at line 73 of file lfs_log.h.

◆ LFS_ERROR

#define LFS_ERROR (   ...)    _LFS_LOG(LOG_ERROR, __VA_ARGS__, "")

override of littlefs's LFS_ERROR()

Definition at line 87 of file lfs_log.h.

◆ LFS_TRACE

#define LFS_TRACE (   ...)

override of littlefs's LFS_TRACE()

Definition at line 68 of file lfs_log.h.

◆ LFS_WARN

#define LFS_WARN (   ...)    _LFS_LOG(LOG_WARNING, __VA_ARGS__, "")

override of littlefs's LFS_WARN()

Definition at line 80 of file lfs_log.h.