ThreadDeinitFunc ThreadDeinit,
void (*ThreadExitPrintStats)(ThreadVars *, void *))
{
- if (!(AppLayerParserIsTxAware(alproto))) {
+ if (alproto != ALPROTO_UNKNOWN && !(AppLayerParserIsTxAware(alproto))) {
SCLogNotice("%s logger not enabled: protocol %s is disabled",
name, AppProtoToString(alproto));
return -1;
op->ThreadDeinit = ThreadDeinit;
op->ThreadExitPrintStats = ThreadExitPrintStats;
- if (tc_log_progress < 0) {
+ if (alproto == ALPROTO_UNKNOWN) {
+ op->tc_log_progress = 0;
+ } else if (tc_log_progress < 0) {
op->tc_log_progress =
AppLayerParserGetStateProgressCompletionStatus(alproto,
STREAM_TOCLIENT);
op->tc_log_progress = tc_log_progress;
}
- if (ts_log_progress < 0) {
+ if (alproto == ALPROTO_UNKNOWN) {
+ op->ts_log_progress = 0;
+ } else if (ts_log_progress < 0) {
op->ts_log_progress =
AppLayerParserGetStateProgressCompletionStatus(alproto,
STREAM_TOSERVER);
while (logger && store) {
DEBUG_VALIDATE_BUG_ON(logger->LogFunc == NULL);
- SCLogDebug("logger %p, LogCondition %p, ts_log_progress %d "
- "tc_log_progress %d", logger, logger->LogCondition,
+ SCLogDebug("logger %p, Alproto %d LogCondition %p, ts_log_progress %d "
+ "tc_log_progress %d", logger, logger->alproto, logger->LogCondition,
logger->ts_log_progress, logger->tc_log_progress);
- if (logger->alproto == alproto &&
- (tx_logged_old & (1<<logger->logger_id)) == 0)
- {
- SCLogDebug("alproto match, logging tx_id %"PRIu64, tx_id);
+ /* always invoke "wild card" tx loggers */
+ if (logger->alproto == ALPROTO_UNKNOWN ||
+ (logger->alproto == alproto &&
+ (tx_logged_old & (1<<logger->logger_id)) == 0)) {
+
+ SCLogDebug("alproto match %d, logging tx_id %"PRIu64, logger->alproto, tx_id);
if (!(AppLayerParserStateIssetFlag(f->alparser,
APP_LAYER_PARSER_EOF))) {
}
}
- SCLogDebug("Logging tx_id %"PRIu64" to logger %d", tx_id,
- logger->logger_id);
+ SCLogDebug("Logging tx_id %"PRIu64" to logger %d", tx_id, logger->logger_id);
PACKET_PROFILING_LOGGER_START(p, logger->logger_id);
logger->LogFunc(tv, store->thread_data, p, f, alstate, tx, tx_id);
PACKET_PROFILING_LOGGER_END(p, logger->logger_id);
- tx_logged |= (1<<logger->logger_id);
+ if (alproto != ALPROTO_UNKNOWN) {
+ tx_logged |= (1<<logger->logger_id);
+ }
}
next_logger:
module->ts_log_progress, module->TxLogCondition,
module->ThreadInit, module->ThreadDeinit,
module->ThreadExitPrintStats);
- logger_bits[module->alproto] |= (1<<module->logger_id);
+ /* Not used with wild card loggers */
+ if (module->alproto != ALPROTO_UNKNOWN) {
+ logger_bits[module->alproto] |= (1<<module->logger_id);
+ }
} else if (module->FiledataLogFunc) {
SCLogDebug("%s is a filedata logger", module->name);
OutputRegisterFiledataLogger(module->logger_id, module->name,