Okay I understand now, I was confused because you were referring to the “Error Logs” section from the “Hardening” page, the code works correctly there, the plugin searches all the error log files in the project and list them in that section like this [1].
What you described in your last comment is nothing that affects the functionality of that section, but the panel named “Error Logs” located in the “Site Info” page, which is where the plugin reads the content of the main log file generally located in the document root of the site.
According to your explanation I should detect where the error log files are and read them according to the location, but that was not the intention of the error log reader. I implemented that tool to allow web developers to find errors generated by the website in development mode. This error log reader is not a tool related with security, but the error log finder is, that is why those two tools are in different sections of the plugin.
For instance, if you have an error log file in the root of the project the hardening page will find that file and any other file in the sub-folders. But if there is an error log file in the “wp-admin” for example, and not in the root of the project the plugin will find those files but not read them in the site info page.
I hope this clarifies the reasons that I have to not complement the action field of the error log reader. My co-workers suggested to remove that tool since it is not security related, so I think this is better than nothing.
[1] https://s3.amazonaws.com/uploads.hipchat.com/19080/374190/gXllhCS3NY27zyl/wp-error-logs.png