[WordPress] 外掛分享: Samudra Log

首頁外掛目錄 › Samudra Log
WordPress 外掛 Samudra Log 的封面圖片
全新外掛
安裝啟用
尚無評分
1748 天前
最後更新
問題解決
WordPress 4.7+ PHP 7.0+ v1.0.2 上架:2020-07-20

內容簡介

這是一個用於 WordPress 網站偵錯紀錄的外掛。

如何使用?

使用此函式來紀錄日誌。

// 變數的值可以是字串、陣列或物件
$variable = 'Variable value';

// 日誌文件的位置在 /wp-content/plugins/samudra-log/log/sd_log.log
sd_log($variable);

// 日誌文件的位置在 /wp-content/plugins/samudra-log/log/my-file.log
sd_log($variable, 'my-file');

限制直接存取日誌文件

如果您使用 Nginx,請將此代碼放置在您的 server block 內。

location ~ /wp-content/plugins/samudra-log/log/.*\.log$ {
deny all;
return 404;
}

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0.2) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Samudra Log」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

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;
}

延伸相關外掛

文章
Filter
Apply Filters
Mastodon