MESSAGE(WARNING "INCLUDE_INSTALL_DIR is not defined, default value is used")
ENDIF()
-OPTION(NDEBUG "Debugging and assertions disabled" TRUE)
+OPTION(NDEBUG "Assertions disabled" TRUE)
IF(NDEBUG)
ADD_DEFINITIONS(-DNDEBUG)
ENDIF()
+OPTION(DEBUG_LOG "Debug log enabled" FALSE)
+IF(DEBUG_LOG)
+ ADD_DEFINITIONS(-DDEBUG_LOG)
+ENDIF()
+
IF(NOT "${CONFPATH}" STREQUAL "")
ADD_DEFINITIONS(-DCONFPATH="${CONFPATH}")
ENDIF()
#pragma once
-#if defined(NDEBUG)
+#if !defined(DEBUG_LOG)
# define bxt_err(fmt, ...) fprintf(stderr, fmt "\n", ##__VA_ARGS__)
# define bxt_dbg(fmt, ...) do { } while (0)
# include <stdio.h>
-# if defined(NDEBUG)
+# if !defined(DEBUG_LOG)
# define bxt_info(fmt, ...) printf("Buxton: " fmt "\n", ##__VA_ARGS__)
# define bxt_err(fmt, ...) \
fprintf(stderr, "Buxton: " fmt "\n", ##__VA_ARGS__)
# define bxt_dbg(fmt, ...) do { } while (0)
-# else /* NDEBUG */
+# else /* DEBUG_LOG */
# define bxt_info(fmt, ...) printf("Buxton: " fmt "\n", ##__VA_ARGS__)
# define bxt_err(fmt, ...) \
printf("Buxton:D:%s:%d: " fmt "\n", __func__, __LINE__, \
##__VA_ARGS__)
-# endif
+# endif /* DEBUG_LOG */
#endif /* _DLOG_H_ */
if (cond & (G_IO_HUP | G_IO_ERR | G_IO_NVAL)) {
if (cond & (G_IO_ERR | G_IO_NVAL))
- bxt_err("Client %d: IO error", fd);
+ bxt_err("Client %d: PID %d(%s) IO %s", fd,
+ cli->cred.pid,
+ cli->label ? cli->label : "",
+ cond & G_IO_ERR ? "error" : "nval");
cli->fd_id = 0;
g_idle_add(del_client, cli);
Name: buxton2
-Version: 1.0
+Version: 1.1
Release: 0
License: Apache-2.0
Summary: A security-enabled configuration system
-DDB_DIR:PATH=%{_localstatedir}/lib/%{name} \
-DTMPFS_DIR:PATH=/run/%{name} \
-DSOCKPATH:PATH=/run/%{name}-0 \
- -DNDEBUG:BOOL=TRUE \
+ -DNDEBUG:BOOL=FALSE \
+ -DDEBUG_LOG:BOOL=FALSE \
.
%__make %{?_smp_mflags}