I have the following code of the json formatter for logs:
#define JLOG_INFO(value) LOG_INFO(LogJson{ { "level" : "info"}, (value) })
When I try to use it:
JLOG_INFO({"message", "Hello world"}, {"module", "base"});
I have the following error because of comma:
error: macro "JLOG_INFO" passed 4 arguments, but takes just 1 JLOG_INFO({"message", "Hello world"}, {"module", "base"})
How can I solve with problem with comma?