mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 12:08:20 +00:00
GH-1036: change print.log to log network time instead of current
This commit is contained in:
parent
eb1a408b6a
commit
54d8954c80
2 changed files with 2 additions and 2 deletions
|
@ -80,7 +80,7 @@ export {
|
||||||
## If :zeek:see:`Log::print_to_log` is set to redirect, ``print`` statements will
|
## If :zeek:see:`Log::print_to_log` is set to redirect, ``print`` statements will
|
||||||
## automatically populate log entries with the fields contained in this record.
|
## automatically populate log entries with the fields contained in this record.
|
||||||
type PrintLogInfo: record {
|
type PrintLogInfo: record {
|
||||||
## Current timestamp.
|
## The network time at which the print statement was executed.
|
||||||
ts: time &log;
|
ts: time &log;
|
||||||
## Set of strings passed to the print statement.
|
## Set of strings passed to the print statement.
|
||||||
vals: string_vec &log;
|
vals: string_vec &log;
|
||||||
|
|
|
@ -215,7 +215,7 @@ static void print_log(const std::vector<IntrusivePtr<Val>>& vals)
|
||||||
vec->Assign(vec->Size(), make_intrusive<StringVal>(d.Description()));
|
vec->Assign(vec->Size(), make_intrusive<StringVal>(d.Description()));
|
||||||
}
|
}
|
||||||
|
|
||||||
record->Assign(0, make_intrusive<TimeVal>(current_time()));
|
record->Assign(0, make_intrusive<TimeVal>(network_time));
|
||||||
record->Assign(1, std::move(vec));
|
record->Assign(1, std::move(vec));
|
||||||
log_mgr->Write(plval.get(), record.get());
|
log_mgr->Write(plval.get(), record.get());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue