Skip to content

Commit

Permalink
core: Log macros print boolean values as true/false instead of 1/0
Browse files Browse the repository at this point in the history
  • Loading branch information
stavallo committed Dec 11, 2023
1 parent 3f26052 commit 71c5c37
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/core/model/log-macros-enabled.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,9 @@
NS_LOG_APPEND_CONTEXT; \
NS_LOG_APPEND_FUNC_PREFIX; \
NS_LOG_APPEND_LEVEL_PREFIX(level); \
auto flags = std::clog.setf(std::ios_base::boolalpha); \
std::clog << msg << std::endl; \
std::clog.flags(flags); \
} \
} while (false)

Expand Down Expand Up @@ -245,7 +247,9 @@
NS_LOG_APPEND_NODE_PREFIX; \
NS_LOG_APPEND_CONTEXT; \
std::clog << g_log.Name() << ":" << __FUNCTION__ << "("; \
auto flags = std::clog.setf(std::ios_base::boolalpha); \
ns3::ParameterLogger(std::clog) << parameters; \
std::clog.flags(flags); \
std::clog << ")" << std::endl; \
} \
} while (false)
Expand All @@ -261,7 +265,9 @@
NS_LOG_CONDITION \
do \
{ \
auto flags = std::clog.setf(std::ios_base::boolalpha); \
std::clog << msg << std::endl; \
std::clog.flags(flags); \
} while (false)

#endif /* NS3_LOG_ENABLE */
Expand Down

0 comments on commit 71c5c37

Please sign in to comment.