Merge in SNORT/snort3 from ~OSTEPANO/snort3:lua_debug_fix to master
Squashed commit of the following:
commit
703b39ee1da25cf5cb52c5b0df2267d7da98cac5
Author: Oleksandr Stepanov <ostepano@cisco.com>
Date: Mon Nov 20 07:34:24 2023 -0500
appid: Additional check for lua logging
break;
case LUA_LOG_TRACE:
- appid_log(init(L) ? nullptr : CURRENT_PACKET, TRACE_DEBUG_LEVEL, "%s:%s\n", name.c_str(), message);
- break;
-
- default:
+ auto curr_packet = (Analyzer::get_local_analyzer() and snort::DetectionEngine::get_context()) ? snort::DetectionEngine::get_current_packet() : nullptr;
+ appid_log(curr_packet, TRACE_DEBUG_LEVEL, curr_packet ? "%s:%s\n" : "AppIdDbg %s:%s\n", name.c_str(), message);
break;
}