Skip to content

Commit 42e8162

Browse files
committed
Disable console logging in release builds
1 parent 18eb666 commit 42e8162

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎httpd/include/httpd/logging.hpp‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,14 @@ namespace xlogger {
223223
# define DEFAULT_LOG_MAXFILE_SIZE (-1)
224224
#endif // DEFAULT_LOG_MAXFILE_SIZE
225225

226+
#ifdef NDEBUG
227+
# define LOG2CONSOLE (false)
228+
#else
229+
# define LOG2CONSOLE (true)
230+
#endif
226231

227232
inline bool global_logging___ = true;
228-
inline bool global_console_logging___ = true;
233+
inline bool global_console_logging___ = LOG2CONSOLE;
229234
inline bool global_write_logging___ = true;
230235
inline int64_t global_logfile_size___ = DEFAULT_LOG_MAXFILE_SIZE;
231236

0 commit comments

Comments
 (0)