|
|
|
/* Copyright (C) 2007-2013 Open Information Security Foundation
|
|
|
|
*
|
|
|
|
* You can copy, redistribute or modify this Program under the terms of
|
|
|
|
* the GNU General Public License version 2 as published by the Free
|
|
|
|
* Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* version 2 along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
|
|
* 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \file
|
|
|
|
*
|
|
|
|
* \author Tom DeCanio <td@npulsetech.com>
|
|
|
|
*
|
|
|
|
* Implements HTTP JSON logging portion of the engine.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "suricata-common.h"
|
|
|
|
#include "debug.h"
|
|
|
|
#include "detect.h"
|
|
|
|
#include "pkt-var.h"
|
|
|
|
#include "conf.h"
|
|
|
|
|
|
|
|
#include "threads.h"
|
|
|
|
#include "threadvars.h"
|
|
|
|
#include "tm-threads.h"
|
|
|
|
|
|
|
|
#include "util-print.h"
|
|
|
|
#include "util-unittest.h"
|
|
|
|
|
|
|
|
#include "util-debug.h"
|
|
|
|
|
|
|
|
#include "output.h"
|
|
|
|
#include "app-layer-htp.h"
|
|
|
|
#include "app-layer.h"
|
|
|
|
#include "app-layer-parser.h"
|
|
|
|
#include "util-privs.h"
|
|
|
|
#include "util-buffer.h"
|
|
|
|
#include "util-proto-name.h"
|
|
|
|
#include "util-logopenfile.h"
|
|
|
|
#include "util-time.h"
|
|
|
|
#include "output-json.h"
|
|
|
|
|
|
|
|
#ifdef HAVE_LIBJANSSON
|
|
|
|
#include <jansson.h>
|
|
|
|
|
|
|
|
typedef struct LogHttpFileCtx_ {
|
|
|
|
LogFileCtx *file_ctx;
|
|
|
|
uint32_t flags; /** Store mode */
|
|
|
|
} LogHttpFileCtx;
|
|
|
|
|
|
|
|
typedef struct JsonHttpLogThread_ {
|
|
|
|
LogHttpFileCtx *httplog_ctx;
|
|
|
|
/** LogFileCtx has the pointer to the file and a mutex to allow multithreading */
|
|
|
|
uint32_t uri_cnt;
|
|
|
|
|
|
|
|
MemBuffer *buffer;
|
|
|
|
} JsonHttpLogThread;
|
|
|
|
|
|
|
|
|
|
|
|
#define LOG_HTTP_DEFAULT 0
|
|
|
|
#define LOG_HTTP_EXTENDED 1
|
|
|
|
#define LOG_HTTP_CUSTOM 2
|
|
|
|
|
|
|
|
/* JSON format logging */
|
|
|
|
static void JsonHttpLogJSON(JsonHttpLogThread *aft, json_t *js, htp_tx_t *tx)
|
|
|
|
{
|
|
|
|
LogHttpFileCtx *http_ctx = aft->httplog_ctx;
|
|
|
|
json_t *hjs = json_object();
|
|
|
|
if (hjs == NULL) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
char *c;
|
|
|
|
/* hostname */
|
|
|
|
if (tx->request_hostname != NULL)
|
|
|
|
{
|
|
|
|
c = SCStrndup((char *)bstr_ptr(tx->request_hostname),
|
|
|
|
bstr_len(tx->request_hostname));
|
|
|
|
if (c != NULL) {
|
|
|
|
json_object_set_new(hjs, "hostname", json_string(c));
|
|
|
|
SCFree(c);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
json_object_set_new(hjs, "hostname", json_string("<hostname unknown>"));
|
|
|
|
}
|
|
|
|
|
|
|
|
/* uri */
|
|
|
|
if (tx->request_uri != NULL)
|
|
|
|
{
|
|
|
|
c = SCStrndup((char *)bstr_ptr(tx->request_uri),
|
|
|
|
bstr_len(tx->request_uri));
|
|
|
|
if (c != NULL) {
|
|
|
|
json_object_set_new(hjs, "url", json_string(c));
|
|
|
|
SCFree(c);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* user agent */
|
|
|
|
htp_header_t *h_user_agent = NULL;
|
|
|
|
if (tx->request_headers != NULL) {
|
|
|
|
h_user_agent = htp_table_get_c(tx->request_headers, "user-agent");
|
|
|
|
}
|
|
|
|
if (h_user_agent != NULL) {
|
|
|
|
c = SCStrndup((char *)bstr_ptr(h_user_agent->value),
|
|
|
|
bstr_len(h_user_agent->value));
|
|
|
|
if (c != NULL) {
|
|
|
|
json_object_set_new(hjs, "http_user_agent", json_string(c));
|
|
|
|
SCFree(c);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
json_object_set_new(hjs, "http_user_agent", json_string("<useragent unknown>"));
|
|
|
|
}
|
|
|
|
|
|
|
|
/* x-forwarded-for */
|
|
|
|
htp_header_t *h_x_forwarded_for = NULL;
|
|
|
|
if (tx->request_headers != NULL) {
|
|
|
|
h_x_forwarded_for = htp_table_get_c(tx->request_headers, "x-forwarded-for");
|
|
|
|
}
|
|
|
|
if (h_x_forwarded_for != NULL) {
|
|
|
|
c = SCStrndup((char *)bstr_ptr(h_x_forwarded_for->value),
|
|
|
|
bstr_len(h_x_forwarded_for->value));
|
|
|
|
if (c != NULL) {
|
|
|
|
json_object_set_new(hjs, "xff", json_string(c));
|
|
|
|
SCFree(c);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* content-type */
|
|
|
|
htp_header_t *h_content_type = NULL;
|
|
|
|
if (tx->response_headers != NULL) {
|
|
|
|
h_content_type = htp_table_get_c(tx->response_headers, "content-type");
|
|
|
|
}
|
|
|
|
if (h_content_type != NULL) {
|
|
|
|
char *p;
|
|
|
|
c = SCStrndup((char *)bstr_ptr(h_content_type->value),
|
|
|
|
bstr_len(h_content_type->value));
|
|
|
|
if (c != NULL) {
|
|
|
|
p = strchrnul(c, ';');
|
|
|
|
*p = '\0';
|
|
|
|
json_object_set_new(hjs, "http_content_type", json_string(c));
|
|
|
|
SCFree(c);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (http_ctx->flags & LOG_HTTP_EXTENDED) {
|
|
|
|
/* referer */
|
|
|
|
htp_header_t *h_referer = NULL;
|
|
|
|
if (tx->request_headers != NULL) {
|
|
|
|
h_referer = htp_table_get_c(tx->request_headers, "referer");
|
|
|
|
}
|
|
|
|
if (h_referer != NULL) {
|
|
|
|
c = SCStrndup((char *)bstr_ptr(h_referer->value),
|
|
|
|
bstr_len(h_referer->value));
|
|
|
|
if (c != NULL) {
|
|
|
|
json_object_set_new(hjs, "http_refer", json_string(c));
|
|
|
|
SCFree(c);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* method */
|
|
|
|
if (tx->request_method != NULL) {
|
|
|
|
c = SCStrndup((char *)bstr_ptr(tx->request_method),
|
|
|
|
bstr_len(tx->request_method));
|
|
|
|
if (c != NULL) {
|
|
|
|
json_object_set_new(hjs, "http_method", json_string(c));
|
|
|
|
SCFree(c);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* protocol */
|
|
|
|
if (tx->request_protocol != NULL) {
|
|
|
|
c = SCStrndup((char *)bstr_ptr(tx->request_protocol),
|
|
|
|
bstr_len(tx->request_protocol));
|
|
|
|
if (c != NULL) {
|
|
|
|
json_object_set_new(hjs, "protocol", json_string(c));
|
|
|
|
SCFree(c);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* response status */
|
|
|
|
if (tx->response_status != NULL) {
|
|
|
|
c = SCStrndup((char *)bstr_ptr(tx->response_status),
|
|
|
|
bstr_len(tx->response_status));
|
|
|
|
if (c != NULL) {
|
|
|
|
json_object_set_new(hjs, "status", json_string(c));
|
|
|
|
SCFree(c);
|
|
|
|
}
|
|
|
|
|
|
|
|
htp_header_t *h_location = htp_table_get_c(tx->response_headers, "location");
|
|
|
|
if (h_location != NULL) {
|
|
|
|
c = SCStrndup((char *)bstr_ptr(h_location->value),
|
|
|
|
bstr_len(h_location->value));
|
|
|
|
if (c != NULL) {
|
|
|
|
json_object_set_new(hjs, "redirect", json_string(c));
|
|
|
|
SCFree(c);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* length */
|
|
|
|
json_object_set_new(hjs, "length", json_integer(tx->response_message_len));
|
|
|
|
}
|
|
|
|
|
|
|
|
json_object_set_new(js, "http", hjs);
|
|
|
|
}
|
|
|
|
|
|
|
|
static int JsonHttpLogger(ThreadVars *tv, void *thread_data, const Packet *p, Flow *f, void *alstate, void *txptr, uint64_t tx_id)
|
|
|
|
{
|
|
|
|
SCEnter();
|
|
|
|
|
|
|
|
htp_tx_t *tx = txptr;
|
|
|
|
JsonHttpLogThread *jhl = (JsonHttpLogThread *)thread_data;
|
|
|
|
MemBuffer *buffer = (MemBuffer *)jhl->buffer;
|
|
|
|
|
|
|
|
json_t *js = CreateJSONHeader((Packet *)p, 1); //TODO const
|
|
|
|
if (unlikely(js == NULL))
|
|
|
|
return TM_ECODE_OK;
|
|
|
|
|
|
|
|
SCLogDebug("got a HTTP request and now logging !!");
|
|
|
|
|
|
|
|
/* reset */
|
|
|
|
MemBufferReset(buffer);
|
|
|
|
|
|
|
|
JsonHttpLogJSON(jhl, js, tx);
|
|
|
|
|
|
|
|
OutputJSONBuffer(js, jhl->httplog_ctx->file_ctx, buffer);
|
|
|
|
json_object_del(js, "http");
|
|
|
|
|
|
|
|
json_object_clear(js);
|
|
|
|
json_decref(js);
|
|
|
|
|
|
|
|
SCReturnInt(TM_ECODE_OK);
|
|
|
|
}
|
|
|
|
|
|
|
|
#define DEFAULT_LOG_FILENAME "http.json"
|
|
|
|
OutputCtx *OutputHttpLogInit(ConfNode *conf)
|
|
|
|
{
|
|
|
|
LogFileCtx *file_ctx = LogFileNewCtx();
|
|
|
|
if(file_ctx == NULL) {
|
|
|
|
SCLogError(SC_ERR_HTTP_LOG_GENERIC, "couldn't create new file_ctx");
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (SCConfLogOpenGeneric(conf, file_ctx, DEFAULT_LOG_FILENAME) < 0) {
|
|
|
|
LogFileFreeCtx(file_ctx);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
LogHttpFileCtx *http_ctx = SCMalloc(sizeof(LogHttpFileCtx));
|
|
|
|
if (unlikely(http_ctx == NULL)) {
|
|
|
|
LogFileFreeCtx(file_ctx);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
OutputCtx *output_ctx = SCCalloc(1, sizeof(OutputCtx));
|
|
|
|
if (unlikely(output_ctx == NULL)) {
|
|
|
|
LogFileFreeCtx(file_ctx);
|
|
|
|
SCFree(http_ctx);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
http_ctx->file_ctx = file_ctx;
|
|
|
|
http_ctx->flags = LOG_HTTP_DEFAULT;
|
|
|
|
|
|
|
|
if (conf) {
|
|
|
|
const char *extended = ConfNodeLookupChildValue(conf, "extended");
|
|
|
|
|
|
|
|
if (extended != NULL) {
|
|
|
|
if (ConfValIsTrue(extended)) {
|
|
|
|
http_ctx->flags = LOG_HTTP_EXTENDED;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
output_ctx->data = http_ctx;
|
|
|
|
output_ctx->DeInit = NULL;
|
|
|
|
|
|
|
|
return output_ctx;
|
|
|
|
}
|
|
|
|
|
output: introduce concept of sub-modules
To support the 'eve-log' idea, we need to be able to force all log
modules to be enabled by the master eve-log module, and need to be
able to make all logs go into a single file. This didn't fit the
API so far, so added the sub-module concept.
A sub-module is a regular module, that registers itself as a sub-
module of another module:
OutputRegisterTxSubModule("eve-log", "JsonHttpLog", "http",
OutputHttpLogInitSub, ALPROTO_HTTP, JsonHttpLogger);
The first argument is the name of the parent. The 4th argument is
the OutputCtx init function. It differs slightly from the non-sub
one. The different is that in addition to it's ConfNode, it gets
the OutputCtx from the parent. This way it can set the parents
LogFileCtx in it's own OutputCtx.
The runmode setup code will take care of all the extra setup. It's
possible to register a module both as a normal module and as a sub-
module, which can operate at the same time.
Only the TxLogger API is handled in this patch, the rest will be
updated later.
12 years ago
|
|
|
OutputCtx *OutputHttpLogInitSub(ConfNode *conf, OutputCtx *parent_ctx)
|
|
|
|
{
|
|
|
|
AlertJsonThread *ajt = parent_ctx->data;
|
|
|
|
|
|
|
|
LogHttpFileCtx *http_ctx = SCMalloc(sizeof(LogHttpFileCtx));
|
|
|
|
if (unlikely(http_ctx == NULL))
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
OutputCtx *output_ctx = SCCalloc(1, sizeof(OutputCtx));
|
|
|
|
if (unlikely(output_ctx == NULL)) {
|
|
|
|
SCFree(http_ctx);
|
output: introduce concept of sub-modules
To support the 'eve-log' idea, we need to be able to force all log
modules to be enabled by the master eve-log module, and need to be
able to make all logs go into a single file. This didn't fit the
API so far, so added the sub-module concept.
A sub-module is a regular module, that registers itself as a sub-
module of another module:
OutputRegisterTxSubModule("eve-log", "JsonHttpLog", "http",
OutputHttpLogInitSub, ALPROTO_HTTP, JsonHttpLogger);
The first argument is the name of the parent. The 4th argument is
the OutputCtx init function. It differs slightly from the non-sub
one. The different is that in addition to it's ConfNode, it gets
the OutputCtx from the parent. This way it can set the parents
LogFileCtx in it's own OutputCtx.
The runmode setup code will take care of all the extra setup. It's
possible to register a module both as a normal module and as a sub-
module, which can operate at the same time.
Only the TxLogger API is handled in this patch, the rest will be
updated later.
12 years ago
|
|
|
return NULL;
|
|
|
|
}
|
output: introduce concept of sub-modules
To support the 'eve-log' idea, we need to be able to force all log
modules to be enabled by the master eve-log module, and need to be
able to make all logs go into a single file. This didn't fit the
API so far, so added the sub-module concept.
A sub-module is a regular module, that registers itself as a sub-
module of another module:
OutputRegisterTxSubModule("eve-log", "JsonHttpLog", "http",
OutputHttpLogInitSub, ALPROTO_HTTP, JsonHttpLogger);
The first argument is the name of the parent. The 4th argument is
the OutputCtx init function. It differs slightly from the non-sub
one. The different is that in addition to it's ConfNode, it gets
the OutputCtx from the parent. This way it can set the parents
LogFileCtx in it's own OutputCtx.
The runmode setup code will take care of all the extra setup. It's
possible to register a module both as a normal module and as a sub-
module, which can operate at the same time.
Only the TxLogger API is handled in this patch, the rest will be
updated later.
12 years ago
|
|
|
|
|
|
|
http_ctx->file_ctx = ajt->file_ctx;
|
|
|
|
http_ctx->flags = LOG_HTTP_DEFAULT;
|
|
|
|
|
|
|
|
if (conf) {
|
|
|
|
const char *extended = ConfNodeLookupChildValue(conf, "extended");
|
|
|
|
|
|
|
|
if (extended != NULL) {
|
|
|
|
if (ConfValIsTrue(extended)) {
|
|
|
|
http_ctx->flags = LOG_HTTP_EXTENDED;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
output_ctx->data = http_ctx;
|
|
|
|
output_ctx->DeInit = NULL;
|
|
|
|
|
|
|
|
return output_ctx;
|
|
|
|
}
|
|
|
|
|
|
|
|
#define OUTPUT_BUFFER_SIZE 65535
|
|
|
|
static TmEcode JsonHttpLogThreadInit(ThreadVars *t, void *initdata, void **data)
|
|
|
|
{
|
|
|
|
JsonHttpLogThread *aft = SCMalloc(sizeof(JsonHttpLogThread));
|
|
|
|
if (unlikely(aft == NULL))
|
|
|
|
return TM_ECODE_FAILED;
|
|
|
|
memset(aft, 0, sizeof(JsonHttpLogThread));
|
|
|
|
|
|
|
|
if(initdata == NULL)
|
|
|
|
{
|
|
|
|
SCLogDebug("Error getting context for HTTPLog. \"initdata\" argument NULL");
|
|
|
|
SCFree(aft);
|
|
|
|
return TM_ECODE_FAILED;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Use the Ouptut Context (file pointer and mutex) */
|
|
|
|
aft->httplog_ctx = ((OutputCtx *)initdata)->data; //TODO
|
|
|
|
|
|
|
|
aft->buffer = MemBufferCreateNew(OUTPUT_BUFFER_SIZE);
|
|
|
|
if (aft->buffer == NULL) {
|
|
|
|
SCFree(aft);
|
|
|
|
return TM_ECODE_FAILED;
|
|
|
|
}
|
|
|
|
|
|
|
|
*data = (void *)aft;
|
|
|
|
return TM_ECODE_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static TmEcode JsonHttpLogThreadDeinit(ThreadVars *t, void *data)
|
|
|
|
{
|
|
|
|
JsonHttpLogThread *aft = (JsonHttpLogThread *)data;
|
|
|
|
if (aft == NULL) {
|
|
|
|
return TM_ECODE_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
MemBufferFree(aft->buffer);
|
|
|
|
/* clear memory */
|
|
|
|
memset(aft, 0, sizeof(JsonHttpLogThread));
|
|
|
|
|
|
|
|
SCFree(aft);
|
|
|
|
return TM_ECODE_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
void TmModuleJsonHttpLogRegister (void) {
|
|
|
|
tmm_modules[TMM_JSONHTTPLOG].name = "JsonHttpLog";
|
|
|
|
tmm_modules[TMM_JSONHTTPLOG].ThreadInit = JsonHttpLogThreadInit;
|
|
|
|
tmm_modules[TMM_JSONHTTPLOG].ThreadDeinit = JsonHttpLogThreadDeinit;
|
|
|
|
tmm_modules[TMM_JSONHTTPLOG].RegisterTests = NULL;
|
|
|
|
tmm_modules[TMM_JSONHTTPLOG].cap_flags = 0;
|
|
|
|
|
output: introduce concept of sub-modules
To support the 'eve-log' idea, we need to be able to force all log
modules to be enabled by the master eve-log module, and need to be
able to make all logs go into a single file. This didn't fit the
API so far, so added the sub-module concept.
A sub-module is a regular module, that registers itself as a sub-
module of another module:
OutputRegisterTxSubModule("eve-log", "JsonHttpLog", "http",
OutputHttpLogInitSub, ALPROTO_HTTP, JsonHttpLogger);
The first argument is the name of the parent. The 4th argument is
the OutputCtx init function. It differs slightly from the non-sub
one. The different is that in addition to it's ConfNode, it gets
the OutputCtx from the parent. This way it can set the parents
LogFileCtx in it's own OutputCtx.
The runmode setup code will take care of all the extra setup. It's
possible to register a module both as a normal module and as a sub-
module, which can operate at the same time.
Only the TxLogger API is handled in this patch, the rest will be
updated later.
12 years ago
|
|
|
/* register as separate module */
|
|
|
|
OutputRegisterTxModule("JsonHttpLog", "http-json-log", OutputHttpLogInit,
|
|
|
|
ALPROTO_HTTP, JsonHttpLogger);
|
output: introduce concept of sub-modules
To support the 'eve-log' idea, we need to be able to force all log
modules to be enabled by the master eve-log module, and need to be
able to make all logs go into a single file. This didn't fit the
API so far, so added the sub-module concept.
A sub-module is a regular module, that registers itself as a sub-
module of another module:
OutputRegisterTxSubModule("eve-log", "JsonHttpLog", "http",
OutputHttpLogInitSub, ALPROTO_HTTP, JsonHttpLogger);
The first argument is the name of the parent. The 4th argument is
the OutputCtx init function. It differs slightly from the non-sub
one. The different is that in addition to it's ConfNode, it gets
the OutputCtx from the parent. This way it can set the parents
LogFileCtx in it's own OutputCtx.
The runmode setup code will take care of all the extra setup. It's
possible to register a module both as a normal module and as a sub-
module, which can operate at the same time.
Only the TxLogger API is handled in this patch, the rest will be
updated later.
12 years ago
|
|
|
|
|
|
|
/* also register as child of eve-log */
|
|
|
|
OutputRegisterTxSubModule("eve-log", "JsonHttpLog", "eve-log.http", OutputHttpLogInitSub,
|
output: introduce concept of sub-modules
To support the 'eve-log' idea, we need to be able to force all log
modules to be enabled by the master eve-log module, and need to be
able to make all logs go into a single file. This didn't fit the
API so far, so added the sub-module concept.
A sub-module is a regular module, that registers itself as a sub-
module of another module:
OutputRegisterTxSubModule("eve-log", "JsonHttpLog", "http",
OutputHttpLogInitSub, ALPROTO_HTTP, JsonHttpLogger);
The first argument is the name of the parent. The 4th argument is
the OutputCtx init function. It differs slightly from the non-sub
one. The different is that in addition to it's ConfNode, it gets
the OutputCtx from the parent. This way it can set the parents
LogFileCtx in it's own OutputCtx.
The runmode setup code will take care of all the extra setup. It's
possible to register a module both as a normal module and as a sub-
module, which can operate at the same time.
Only the TxLogger API is handled in this patch, the rest will be
updated later.
12 years ago
|
|
|
ALPROTO_HTTP, JsonHttpLogger);
|
|
|
|
}
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
static TmEcode OutputJsonThreadInit(ThreadVars *t, void *initdata, void **data)
|
|
|
|
{
|
|
|
|
SCLogInfo("Can't init JSON output - JSON support was disabled during build.");
|
|
|
|
return TM_ECODE_FAILED;
|
|
|
|
}
|
|
|
|
|
|
|
|
void TmModuleJsonHttpLogRegister (void)
|
|
|
|
{
|
|
|
|
tmm_modules[TMM_JSONHTTPLOG].name = "JsonHttpLog";
|
|
|
|
tmm_modules[TMM_JSONHTTPLOG].ThreadInit = OutputJsonThreadInit;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|