Skip to content
Snippets Groups Projects
Commit c9e19c0b authored by Jan Včelák's avatar Jan Včelák :rocket:
Browse files

logging: extract time format

parent 430864b1
No related branches found
No related tags found
1 merge request!151DNSSEC: signatures refreshing
......@@ -223,8 +223,7 @@ static int _log_msg(logsrc_t src, int level, const char *msg)
precise = true;
#endif /* ENABLE_MICROSECONDS_LOG */
tlen = strftime(tstr, sizeof(tstr),
"%Y-%m-%dT%H:%M:%S ", &lt);
tlen = strftime(tstr, sizeof(tstr), KNOT_LOG_TIME_FORMAT " ", &lt);
if (precise && tlen > 0) {
char pm = (lt.tm_gmtoff > 0) ? '+' : '-';
......
......@@ -62,6 +62,9 @@ typedef enum {
/*! \brief Severity mapping. */
#define LOG_FATAL LOG_CRIT /*!< Fatal errors cannot be masked. */
/*! \brief Format for timestamps in log files. */
#define KNOT_LOG_TIME_FORMAT "%Y-%m-%dT%H:%M:%S"
/* Logging facility setup. */
/*!
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment