Redef Log::default_logdir has bringed an error "redef" used but not previously defined (Log::default_logdir)""

in local.zeek,add the following statement
@load /usr/local/zeek5.0.5-opt/share/zeek/base/frameworks/logging
redef Log::default_logdir = “/root/log”;
save,and run “zeek -i ens41f0 /usr/local/zeek/share/zeek/site/local.zeek”. The resulting error is as follows:
“error in /usr/local/zeek/share/zeek/site/local.zeek, line 111: “redef” used but not previously defined (Log::default_logdir)”
my zeek version is 5.2.0.
Who has experienced similar problems and help me?

Hello @jupy,

@load /usr/local/zeek5.0.5-opt/share/zeek/base/frameworks/logging
redef Log::default_logdir = “/root/log”;

my zeek version is 5.2.0.

If you’re running Zeek 5.2.0, you should not be loading the logging framework from 5.0.5 as you indicate in the first lines.

Could you replace @load /usr/local/zeek5.0.5-opt/share/zeek/base/frameworks/logging with a relative load like and see if this changes things?

@load base/frameworks/logging

Also, double check zeek --version that you’re actually running Zeek 5.2.0.

EDIT: I had replied similar here, too: redef Log::default_logdir has bringed an error "redef" used but not previously defined (Log::default_logdir)"" · Issue #2900 · zeek/zeek · GitHub

Thanks,
Arne

thanks a lot, the error is resolved now.