# Log-extensions scripting issue

**URL:** <https://community.zeek.org/t/log-extensions-scripting-issue/6578>\
**Category:** Zeek\
**Tags:** scripting\
**Created:** [June 30, 2022, 5:03pm UTC](https://community.zeek.org/t/log-extensions-scripting-issue/6578 "2022-06-30T17:03:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Greg.N](https://avatars.discourse-cdn.com/v4/letter/g/71e660/32.png) [@Greg.N](https://community.zeek.org/u/Greg.N)\
**Post date:** [June 30, 2022, 5:03pm UTC](https://community.zeek.org/t/log-extensions-scripting-issue/6578/1 "2022-06-30T17:03:40Z")

</div>

Hello,

I’m using the script below, but when presented in my logs the field is \_my\_server\_name instead of my\_server\_name. I’ve tried multiple ways at removing the initial underscore but being new to this scripting I can’t seem to resolve the issue.

#Zeek  
option my\_server\_name = “Zeek-server1”;

type MyLogExtension: record {  
server\_name: string &log;  
};

function add\_my\_log\_extension(path: string): MyLogExtension  
{  
return MyLogExtension($server\_name = my\_server\_name);  
}

redef Log::default\_ext\_func = add\_my\_log\_extension;

---

<div class="post-metadata">

**Author:** ![dopheide](https://avatars.discourse-cdn.com/v4/letter/d/74df32/32.png) [@dopheide](https://community.zeek.org/u/dopheide)\
**Post date:** [June 30, 2022, 5:30pm UTC](https://community.zeek.org/t/log-extensions-scripting-issue/6578/2 "2022-06-30T17:30:32Z")

</div>

Try adding:

`redef Log::default_ext_prefix: string = "";`

(edited to remove smart quotes)

---

<div class="post-metadata">

**Author:** ![Greg.N](https://avatars.discourse-cdn.com/v4/letter/g/71e660/32.png) [@Greg.N](https://community.zeek.org/u/Greg.N)\
**Post date:** [June 30, 2022, 6:04pm UTC](https://community.zeek.org/t/log-extensions-scripting-issue/6578/3 "2022-06-30T18:04:58Z")

</div>

Thank you this appears to have solved the issue.
