The relationship between statistics and logging in schedule processes is
fairly straightforward, but there are some subtleties. Basically, a
schedule process sends two kinds of data to the log. The first is a
record of the current state of all the counters in the process hierarchy
above (and if log_counter
is checked, from) the logging process
itself. This tags the log data with the point in time when it was
computed. The other component is a series of columns of data that are
generated by each of the statistic processes in either the loop or final
statistics groups.
This information is sent out to any logging processes that are being updated by the schedule process in question. These logging processes then transform the data into the graphical form characteristic of the display they are using (e.g. a graph or a grid of color squares), and/or dump it to a log file, etc (see section 13 Logs and Graphs).
Thus, the way to get a log to record some information is to have a statistic process which collects the information and sends it along to the log when the schedule process tells it to. For this reason, when you want to monitor unit state variables over time, for example, you have to create a statistic process which gets these state variables, and sends them to the log (see section 12.8.2 Monitoring Network State Variables).