# Redef Log::default\_logdir has bringed an error "redef" used but not previously defined (Log::default\_logdir)""

**URL:** https://community.zeek.org/t/redef-log-default-logdir-has-bringed-an-error-redef-used-but-not-previously-defined-log-default-logdir/6956
**Category:** Zeek
**Tags:** logging
**Created:** [March 29, 2023, 2:57am UTC](https://community.zeek.org/t/redef-log-default-logdir-has-bringed-an-error-redef-used-but-not-previously-defined-log-default-logdir/6956 "2023-03-29T02:57:50Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jupy](https://yyz1.discourse-cdn.com/flex011/user_avatar/community.zeek.org/jupy/32/657_2.png) [@jupy](https://community.zeek.org/u/jupy)
#### Post date: [March 29, 2023, 2:57am UTC](https://community.zeek.org/t/redef-log-default-logdir-has-bringed-an-error-redef-used-but-not-previously-defined-log-default-logdir/6956/1 "2023-03-29T02:57:50Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![awelzel](https://yyz1.discourse-cdn.com/flex011/user_avatar/community.zeek.org/awelzel/32/609_2.png) [@awelzel](https://community.zeek.org/u/awelzel)
#### Post date: [March 30, 2023, 7:29am UTC](https://community.zeek.org/t/redef-log-default-logdir-has-bringed-an-error-redef-used-but-not-previously-defined-log-default-logdir/6956/2 "2023-03-30T07:29:59Z")

</div>

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?

```auto
@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](https://github.com/zeek/zeek/issues/2900)

Thanks,  
Arne

---

<div class="post-metadata">

### Author: ![jupy](https://yyz1.discourse-cdn.com/flex011/user_avatar/community.zeek.org/jupy/32/657_2.png) [@jupy](https://community.zeek.org/u/jupy)
#### Post date: [October 16, 2023, 6:37am UTC](https://community.zeek.org/t/redef-log-default-logdir-has-bringed-an-error-redef-used-but-not-previously-defined-log-default-logdir/6956/3 "2023-10-16T06:37:47Z")

</div>

thanks a lot, the error is resolved now.
