FILE(GLOB LUA_PLUGINS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/src/plugins/lua" "${CMAKE_CURRENT_SOURCE_DIR}/src/plugins/lua/*.lua" )
FOREACH(LUA_PLUGIN IN LISTS LUA_PLUGINS)
GET_FILENAME_COMPONENT(_rp ${LUA_PLUGIN} PATH)
- MESSAGE(STATUS ${LUA_PLUGIN})
- MESSAGE(STATUS ${_rp})
IF(NOT IS_DIRECTORY ${DESTDIR}/${ETC_PREFIX}/rspamd/plugins/lua/${_rp})
INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E make_directory ${DESTDIR}/${ETC_PREFIX}/rspamd/plugins/lua/${_rp})")
ENDIF(NOT IS_DIRECTORY ${DESTDIR}/${ETC_PREFIX}/rspamd/plugins/lua/${_rp})
now = time (NULL);
tms = localtime (&now);
- strftime (timebuf, sizeof (timebuf), "%b %d %H:%M:%S", tms);
+ strftime (timebuf, sizeof (timebuf), "%F %H:%M:%S", tms);
switch (rspamd_log->process_type) {
case TYPE_MAIN:
cptype = "main";
break;
}
if (function == NULL) {
- r = rspamd_snprintf (tmpbuf, sizeof (tmpbuf), "#%P(%s): %s rspamd ", rspamd_log->pid, cptype, timebuf);
+ r = rspamd_snprintf (tmpbuf, sizeof (tmpbuf), "%s #%P(%s) ", timebuf, rspamd_log->pid, cptype);
}
else {
- r = rspamd_snprintf (tmpbuf, sizeof (tmpbuf), "#%P(%s): %s rspamd %s: ", rspamd_log->pid, cptype, timebuf, function);
+ r = rspamd_snprintf (tmpbuf, sizeof (tmpbuf), "%s #%P(%s) %s: ", timebuf, rspamd_log->pid, cptype, function);
}
iov[0].iov_base = tmpbuf;
iov[0].iov_len = r;
debug_task ("found %d parts in message", task->parts_count);
if (task->queue_id == NULL) {
- task->queue_id = (char *)g_mime_message_get_message_id (task->message);
+ task->queue_id = "undef";
}
task->message_id = g_mime_message_get_message_id (task->message);
if (task->message_id == NULL) {
cd.task = task;
cd.log_buf = logbuf;
- cd.log_offset = rspamd_snprintf (logbuf, sizeof (logbuf), "msg ok, id: <%s>, ", task->message_id);
+ cd.log_offset = rspamd_snprintf (logbuf, sizeof (logbuf), "id: <%s>, qid: <%s>, ", task->message_id, task->queue_id);
cd.log_size = sizeof (logbuf);
cd.alive = TRUE;
cd.task = task;
cd.log_buf = logbuf;
- cd.log_offset = rspamd_snprintf (logbuf, sizeof (logbuf), "msg ok, id: <%s>, ", task->message_id);
+ cd.log_offset = rspamd_snprintf (logbuf, sizeof (logbuf), "id: <%s>, qid: <%s>, ", task->message_id, task->queue_id);
cd.log_size = sizeof (logbuf);
cd.alive = TRUE;