
- 正在使用
- 10 以下
- 评分
- 暂无
- 累计下载
- 1,192
- 最近更新
- 2021年6月5日
需要 WordPress 4.7+已测试到 5.7.22PHP 7.0+
贡献者
截图
Write log for debugging WordPress site.
How to Use?
Use this function to write log.
// Variable value can be string, array, or object
$variable = 'Variable value';
// Log file will be in /wp-content/plugins/samudra-log/log/sd_log.log
sd_log($variable);
// Log file will be in /wp-content/plugins/samudra-log/log/my-file.log
sd_log($variable, 'my-file');
Restrict direct access to log file
If you are using Nginx, put this code inside your server block.
location ~ /wp-content/plugins/samudra-log/log/.*\.log$ {
deny all;
return 404;
}
