Commit 1e704be
committed
pping: Refactor output handling
Refactor code for various output functions to avoid hard-coding stdout
and relying on global variables. Collect output-related parameters
into a new output_context struct which can easily be passed as an
explicit argument to output related functions. Get rid of the global
json_ctx and print_event_func variables, as corresponding information
is now included in the output_context which is directly passed to the
required functions.
Overall, these changes aim to make it more flexible how and where
output is written. This will make it easier to for example add support
for writing directly to files in the future.
Signed-off-by: Simon Sundberg <simon.sundberg@kau.se>1 parent 1319871 commit 1e704be
1 file changed
+131
-105
lines changed
0 commit comments