Skip to content

Commit 62534ef

Browse files
authored
Fix cadet::log::SelectiveStdWritePolicy
Fix `cadet::log::SelectiveStdWritePolicy<switchLvl>` to write out objects, not end-of-line sequences
1 parent cca5ef3 commit 62534ef

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

include/common/Logger.hpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ namespace log
4040

4141
static inline void end(LogLevel lvl) { std::cout << std::endl; }
4242

43-
template <class T>
43+
template <class T>
4444
static inline void writeObj(LogLevel lvl, const T& obj)
4545
{
4646
std::cout << obj;
@@ -57,7 +57,7 @@ namespace log
5757

5858
static inline void end(LogLevel lvl) { std::cerr << std::endl; }
5959

60-
template <class T>
60+
template <class T>
6161
static inline void writeObj(LogLevel lvl, const T& obj)
6262
{
6363
std::cerr << obj;
@@ -82,13 +82,13 @@ namespace log
8282
std::cout << std::endl;
8383
}
8484

85-
template <class T>
85+
template <class T>
8686
static inline void writeObj(LogLevel lvl, const T& obj)
8787
{
8888
if (lvl < switchLvl)
89-
std::cerr << std::endl;
89+
std::cerr << obj;
9090
else
91-
std::cout << std::endl;
91+
std::cout << obj;
9292
}
9393
};
9494

0 commit comments

Comments
 (0)