# by seeing what is actually being sent.
#
# suppress_secrets = no
+
+ # Add timestamps to debug logs
+ #
+ # By default, at debug level 1 and 2, messages are produced
+ # without timestamps.
+ #
+ # Enabling this option will include timestamps on all debug logs.
+# timestamp = no
}
# The program to execute to do concurrency checks.
log_dst_t dst; //!< Log destination.
char const *file; //!< Path to log file.
char const *debug_file; //!< Path to debug log file.
+ bool timestamp; //!< Should logs always have timestamps.
} fr_log_t;
typedef void (*radlog_func_t)(log_type_t lvl, log_lvl_t priority, REQUEST *, char const *, va_list ap);
.dst = L_DST_STDOUT,
.file = NULL,
.debug_file = NULL,
+ .timestamp = false,
};
static int stderr_fd = -1; //!< The original unmolested stderr file descriptor
* of debugging.
*/
if (default_log.dst != L_DST_SYSLOG) {
- if ((rad_debug_lvl != 1) && (rad_debug_lvl != 2)) {
+ if (((rad_debug_lvl != 1) && (rad_debug_lvl != 2)) || default_log.timestamp) {
time_t timeval;
timeval = time(NULL);
{ "use_utc", FR_CONF_POINTER(PW_TYPE_BOOLEAN, &log_dates_utc), NULL },
{ "msg_denied", FR_CONF_POINTER(PW_TYPE_STRING, &main_config.denied_msg), "You are already logged in - access denied" },
{ "suppress_secrets", FR_CONF_POINTER(PW_TYPE_BOOLEAN, &main_config.suppress_secrets), NULL },
+ { "timestamp", FR_CONF_POINTER(PW_TYPE_BOOLEAN, &default_log.timestamp), NULL },
CONF_PARSER_TERMINATOR
};