Hi,
Yes, we came to the same conclusion while driving to embedded world.
I've got the implementation and API specification ready as well and will open
a PR later.
Cheers, Ludwig
Am 27. Februar 2015 02:14:51 MEZ, schrieb Jozef Maslik ma...@binarylemon.com:
Hi,
Yes compiler do not optimize
Hi,
Yes compiler do not optimize (remove out) empty function defined as is
suggested.
But if RIOT does not want use macros, we can define empty function as static
inline function in header and then will be removed by optimization.
log_api.h
#if MODULE_LOG
void log_info(...);
#else
static
Hi Ludwig,
In my simple tinking the macro approach does not exclude the API, just a
pseudo code example:
API log_api.h:
...
void log.info(const char* fmt, ...);
...
#ifdef ENABLE_INFO
#define LOG_INFO(...) log.info(__VA_ARGS__)
#else
#define LOG_INFO(...)
#endif
In RIOT framework and
Hi Attilio,
personally I think Macros might not be the best idea - one of the design
principles of RIOT so far is to limit the use of Macros to the minimum.
You can actually get the same results for the code below by using a
plain API based approach:
log_api.h:
void log_info(...);
Hi Jozef,
AFAIK there has been no work on a solution so far.
However, I thought about this the other day in the context of the function
pointer discussion and would like to propose a logging API (maybe there is an
issue for that as well somewhere) for `core`, which offers things like
+1 thought about this for a long time, too. Though my approach would be
with macros and more global (similar to how DEBUG is now).
Am 23.02.2015 07:16 schrieb Ludwig Ortmann ludwig.ortm...@fu-berlin.de:
Hi Jozef,
AFAIK there has been no work on a solution so far.
However, I thought about