how can I access to php logs using plugin ? I would like in my plugin to show logs, in case there will be some error user can easily check log and send me it.
If you have Try and cache block and loggin error manually than you can try this :
$mylogfilepath = plugin_dir_path(__FILE__).'debug.log'; $errormessage = 'SOME ERROR'.PHP_EOL; error_log($errormessage, 3, $mylogfilepath);
Place debug.log file directly inside your plugin. and it will log error to that file. third attribute in error_log set path of file in which log should be recored.