From 54d8954c80fd4765552c591178aff23a5d0c6ae2 Mon Sep 17 00:00:00 2001 From: Jon Siwek Date: Fri, 26 Jun 2020 19:55:09 -0700 Subject: [PATCH] GH-1036: change print.log to log network time instead of current --- scripts/base/frameworks/logging/main.zeek | 2 +- src/Stmt.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/base/frameworks/logging/main.zeek b/scripts/base/frameworks/logging/main.zeek index b318cd0151..924fecd498 100644 --- a/scripts/base/frameworks/logging/main.zeek +++ b/scripts/base/frameworks/logging/main.zeek @@ -80,7 +80,7 @@ export { ## 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. type PrintLogInfo: record { - ## Current timestamp. + ## The network time at which the print statement was executed. ts: time &log; ## Set of strings passed to the print statement. vals: string_vec &log; diff --git a/src/Stmt.cc b/src/Stmt.cc index b0ef9c4ab7..00fab5776c 100644 --- a/src/Stmt.cc +++ b/src/Stmt.cc @@ -215,7 +215,7 @@ static void print_log(const std::vector>& vals) vec->Assign(vec->Size(), make_intrusive(d.Description())); } - record->Assign(0, make_intrusive(current_time())); + record->Assign(0, make_intrusive(network_time)); record->Assign(1, std::move(vec)); log_mgr->Write(plval.get(), record.get()); }