I am using Zeek version 5.0.7. The file from which the logs are extracted is in zeek/base/frameworks/logging/writers/ascii.zeek, I state as follows
const logdir = “/directory/folder” &redef;
I want to access this from another .zeek file and add another subfolder. When I tried to add the file extension with @load, I could not handle this. How can I access that const logdir directory where the logs are output?
The constant logdir is defined in the LogAscii module. You can refer to it by its fully qualified name LogAscii::logdir from anywhere. Note that LogAscii::logdir got superseeded by the more general Log::default_logdir in more recent Zeek version.
As a side note, to override constants declared &redef (i.e., redefinable) you should redefine them in a file controlled by you, e.g., local.zeek. That way your configuration changes are preserved across updates.
# In e.g., `local.zeek`.
redef LogAscii::logdir = "/tmp/logs";