Skip to content

Commit 5ca0bba

Browse files
GiulianoFranchettocarlescufi
authored andcommitted
logging: hide logging from jetbrains idea
For now, the logging subsystem is hidden from CDT to prevent freezing of the IDE. CLion has the same issue, where the IDE becomes slow with big RAM spikes. Fortunately, CLion automatically defines a macro __JETBRAINS_IDE__ that we can use Signed-off-by: Giuliano Franchetto <[email protected]>
1 parent 87ed12d commit 5ca0bba

File tree

1 file changed

+3
-3
lines changed
  • include/zephyr/logging

1 file changed

+3
-3
lines changed

include/zephyr/logging/log.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -418,10 +418,10 @@ void z_log_vprintk(const char *fmt, va_list ap);
418418
Z_LOG_RESOLVED_LEVEL(level, 0)
419419

420420
/*
421-
* Eclipse CDT parser is sometimes confused by logging API code and freezes the
422-
* whole IDE. Following lines hides LOG_x macros from CDT.
421+
* Eclipse CDT or JetBrains Clion parser is sometimes confused by logging API
422+
* code and freezes the whole IDE. Following lines hides LOG_x macros from them.
423423
*/
424-
#if defined(__CDT_PARSER__)
424+
#if defined(__CDT_PARSER__) || defined(__JETBRAINS_IDE__)
425425
#undef LOG_ERR
426426
#undef LOG_WRN
427427
#undef LOG_INF

0 commit comments

Comments
 (0)