Add a remote_log_peer event which contains an event_peer record param.

Addresses #493.
This commit is contained in:
Jon Siwek 2011-12-01 14:07:08 -06:00
parent eb3af25e57
commit 0c8b5a712d
5 changed files with 104 additions and 10 deletions

View file

@ -130,6 +130,13 @@ event remote_log(level: count, src: count, msg: string)
do_script_log_common(level, src, msg);
}
# This is a core generated event.
event remote_log_peer(p: event_peer, level: count, src: count, msg: string)
{
local rmsg = fmt("[#%d/%s:%d] %s", p$id, p$host, p$p, msg);
do_script_log_common(level, src, rmsg);
}
function do_script_log(p: event_peer, msg: string)
{
do_script_log_common(REMOTE_LOG_INFO, REMOTE_SRC_SCRIPT, msg);