• Resolved flynsarmy

    (@flynsarmy)


    We have debug to file enabled and we’re using the plainview\sdk_broadcast\wordpress\traits_debug_file filter to point this file to the machines temp directory like so:

    /**
     * Log to temp directory. Defaults to our plugin directory which is slow because of EFS.
     *
     * @param string $filename
     * @return string
     */
    
    add_filter('plainview\sdk_broadcast\wordpress\traits_debug_file', function (string $filename): string {
        return rtrim(sys_get_temp_dir(), '/') . '/' . basename($filename);
    });

    Problem is that this new directory isn’t being updated on the link displayed in the description under Network – Broadcast – Settings – Debugging – Save debug to file checkbox. The description is still showing the default URL of https://mysite.com/wp-content/plugins/threewp-broadcast/ThreeWP_Broadcast.php.bf1331f6.debug.html.

    If the above filter is being used, I suggest this tooltip instead shows the filepath on disk instead of a clickable URL. This is important because in my code example above, my current sys temp dir is /var/folders/yl/hlnm5n1j22h6x987xbh1xyk00000gn/T which isn’t very memorable and makes finding the broadcast debug file quite difficult.

    • This topic was modified 4 years, 1 month ago by flynsarmy.
    • This topic was modified 4 years, 1 month ago by flynsarmy.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Incorrect debug log file location when using filter’ is closed to new replies.