Title: mkdir Warning When Logging
Last modified: December 5, 2023

---

# mkdir Warning When Logging

 *  Resolved [Tim Nolte](https://wordpress.org/support/users/tnolte/)
 * (@tnolte)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/mkdir-warning-when-logging/)
 * I’m generally getting a constant warning when Trunc Logging is checking for the
   log file.
 *     ```wp-block-code
       Warning: mkdir(): File exists in public/wp-content/plugins/trunc-logging/trunc.php on line 141
       ```
   

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Thread Starter [Tim Nolte](https://wordpress.org/support/users/tnolte/)
 * (@tnolte)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/mkdir-warning-when-logging/#post-17406788)
 * [@dcid](https://wordpress.org/support/users/dcid/) as we’re beginning to continue
   with our roll-out of the plugin is there any status update on this issue?
 *  Thread Starter [Tim Nolte](https://wordpress.org/support/users/tnolte/)
 * (@tnolte)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/mkdir-warning-when-logging/#post-17406801)
 * I would think that perhaps the fix for this would be just to first include a 
   check for the directory before trying to create it.
 *     ```wp-block-code
       if ( ! is_dir( TRUNCLOGGING_DIR ) ) {
               mkdir(TRUNCLOGGING_DIR);
       }
       ```
   
 *  Plugin Author [Daniel Cid](https://wordpress.org/support/users/dcid/)
 * (@dcid)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/mkdir-warning-when-logging/#post-17407082)
 * Missed this one sorry. Easy fix and I will push it later today.
 * thanks,
 *  Plugin Author [Daniel Cid](https://wordpress.org/support/users/dcid/)
 * (@dcid)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/mkdir-warning-when-logging/#post-17408126)
 * Should be fixed on 1.0.6.
 *  Thread Starter [Tim Nolte](https://wordpress.org/support/users/tnolte/)
 * (@tnolte)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/mkdir-warning-when-logging/#post-17409350)
 * Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘mkdir Warning When Logging’ is closed to new replies.

 * ![](https://ps.w.org/trunc-logging/assets/icon-256x256.png?rev=2816328)
 * [Trunc Logging - Auditing syslog for WordPress](https://wordpress.org/plugins/trunc-logging/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/trunc-logging/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/trunc-logging/)
 * [Active Topics](https://wordpress.org/support/plugin/trunc-logging/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/trunc-logging/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/trunc-logging/reviews/)

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)
 * [warning](https://wordpress.org/support/topic-tag/warning/)

 * 5 replies
 * 2 participants
 * Last reply from: [Tim Nolte](https://wordpress.org/support/users/tnolte/)
 * Last activity: [2 years, 4 months ago](https://wordpress.org/support/topic/mkdir-warning-when-logging/#post-17409350)
 * Status: resolved