# Get logfile name

**URL:** <https://community.dynatrace.com/t/get-logfile-name/47851>\
**Category:** DQL\
**Tags:** dql, log-ingestion, logs\
**Created:** [September 20, 2024, 7:28am UTC](https://community.dynatrace.com/t/get-logfile-name/47851 "2024-09-20T07:28:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mferstl](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mferstl/32/26292_2.png) [@mferstl](https://community.dynatrace.com/u/mferstl)\
**Post date:** [September 20, 2024, 7:28am UTC](https://community.dynatrace.com/t/get-logfile-name/47851/1 "2024-09-20T07:28:39Z")

</div>

We are using grail and i am using a folder with different files as the logsource and would like to be able to get the filename in each logfileline, is that possbile?

---

<div class="post-metadata">

**Author:** ![krzysztof\_hoja](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/krzysztof_hoja/32/34625_2.png) [@krzysztof\_hoja](https://community.dynatrace.com/u/krzysztof_hoja)\
**Post date:** [September 20, 2024, 10:12am UTC](https://community.dynatrace.com/t/get-logfile-name/47851/2 "2024-09-20T10:12:58Z")

</div>

If I am not mistaken, in this case full file name with path should be in&nbsp;_ **log.file.path** _ field.  
Should be visible when you:

```markup
| fieldsAdd log.file.path

```

---

<div class="post-metadata">

**Author:** ![mferstl](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mferstl/32/26292_2.png) [@mferstl](https://community.dynatrace.com/u/mferstl)\
**Post date:** [September 27, 2024, 12:36pm UTC](https://community.dynatrace.com/t/get-logfile-name/47851/3 "2024-09-27T12:36:25Z")

</div>

Thanks for the reply, but i get a null on that one

---

<div class="post-metadata">

**Author:** ![moin\_DT1](https://avatars.discourse-cdn.com/v4/letter/m/c67d28/32.png) [@moin\_DT1](https://community.dynatrace.com/u/moin_DT1)\
**Post date:** [February 28, 2025, 4:32pm UTC](https://community.dynatrace.com/t/get-logfile-name/47851/4 "2025-02-28T16:32:05Z")

</div>

Hi&nbsp;[@mferstl](https://community.dynatrace.com/user/38390)&nbsp;  
May be try adding attributes in Custom Logs Source:

 ![moin_DT1_0-1740760301313.png](https://global.discourse-cdn.com/dynatrace/original/3X/6/f/6f728d18bef8c07a71793103a15122b0c208f053.png)

Regards,

Moin

---

<div class="post-metadata">

**Author:** ![mferstl](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mferstl/32/26292_2.png) [@mferstl](https://community.dynatrace.com/u/mferstl)\
**Post date:** [March 11, 2025, 8:25am UTC](https://community.dynatrace.com/t/get-logfile-name/47851/5 "2025-03-11T08:25:23Z")

</div>

thanks that works,
