# Add custom Log File directory.

**URL:** <https://community.dynatrace.com/t/add-custom-log-file-directory/34074>\
**Category:** Logs\
**Tags:** log-configuration, log-monitoring-class\
**Created:** [February 9, 2022, 4:41am UTC](https://community.dynatrace.com/t/add-custom-log-file-directory/34074 "2022-02-09T04:41:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mudasar](https://avatars.discourse-cdn.com/v4/letter/m/3ab097/32.png) [@Mudasar](https://community.dynatrace.com/u/Mudasar)\
**Post date:** [February 9, 2022, 4:41am UTC](https://community.dynatrace.com/t/add-custom-log-file-directory/34074/1 "2022-02-09T04:41:25Z")

</div>

Hi Team,

We are unable to add custom log file directory monitoring.

Regards,

Mudasar

---

<div class="post-metadata">

**Author:** ![Mudasar](https://avatars.discourse-cdn.com/v4/letter/m/3ab097/32.png) [@Mudasar](https://community.dynatrace.com/u/Mudasar)\
**Post date:** [February 21, 2022, 5:35am UTC](https://community.dynatrace.com/t/add-custom-log-file-directory/34074/2 "2022-02-21T05:35:25Z")

</div>

Hi ,

Please can help us to add the custom add custom log file directory monitoring.?

Regards,

Mudasar

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [February 21, 2022, 8:57pm UTC](https://community.dynatrace.com/t/add-custom-log-file-directory/34074/3 "2022-02-21T20:57:31Z")

</div>

Can you please elaborate on what you are trying to achieve? Monitor a directory for file? Add a directory into Log monitoring in Dynatrace? Which version of Log Monitoring in Dynatrace are you using (Log Monitoring 1 or Log Monitoring v2)?

---

<div class="post-metadata">

**Author:** ![anjali\_menon](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@anjali\_menon](https://community.dynatrace.com/u/anjali_menon)\
**Post date:** [March 29, 2022, 2:41pm UTC](https://community.dynatrace.com/t/add-custom-log-file-directory/34074/4 "2022-03-29T14:41:20Z")

</div>

Hi Julius,

The ask is to monitor a log directory instead of an individual file.

Using log monitoring v2.

Application team creates new log files at regular intervals and it is a hassle to manually update each individual file for monitoring in Dynatrace. It would be beneficial, if Dynatrace is able to monitor a log directory/path.

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [March 30, 2022, 11:28am UTC](https://community.dynatrace.com/t/add-custom-log-file-directory/34074/5 "2022-03-30T11:28:08Z")

</div>

If your log file is automatically detected by OneAget, you can enable log monitoring for the process group and each newly created log file will be monitored automatically.&nbsp;  
Go to&nbsp;Settings \>&nbsp;Log Monitoring \>&nbsp;Log sources and storage and check if you can see the log file under the process group.

---

<div class="post-metadata">

**Author:** ![LeoK](https://avatars.discourse-cdn.com/v4/letter/l/f4b2a3/32.png) [@LeoK](https://community.dynatrace.com/u/LeoK)\
**Post date:** [April 13, 2022, 11:34pm UTC](https://community.dynatrace.com/t/add-custom-log-file-directory/34074/6 "2022-04-13T23:34:54Z")

</div>

Is it possible that the issue reported in this thread comes from the fact that a custom location of the log file is not capable of being monitored?

I’m having a similar issue. The commercial application that my company uses writes a log to a folder structure like this - d:\infogenesis\log\_dir\20220413.pmi.

Log monitoring V2 has limitation where if the first or second folder in the path is not exactly like “log” or “logs”, then you can’t add that path to be monitored for logs. In my case, it’s “log\_dir” so I can’t add it, get error “Specified filepath of log is not valid or not allowed”
