zouber / Fanshop

1 stars 0 forks source link

[備忘] 引入更完善的 debug 機制 #444

Closed zouber closed 10 years ago

zouber commented 10 years ago

現在每一頁都可以帶上 debug 參數 debug 可以接受的值如下:

  1. true 或 1(不論是以字串 布林 或 整數 的型態傳入都可以接收): debug 被解讀為"真", debug 模式開啟
  2. false 或 0(型態可接受性如上): debug 被解讀為"假" --> debug 模式關閉
  3. 其他值: 為了特殊用途, 可以自訂 debug 模式的辨識代號, 例如我想解 #434 的問題, 就可以定義該 issue 要測試需要調整的環節, 然後將 debug 設為 "issue_434" , 所以我一看到 debug 是這個值我就不做真正的動作, 方便測試
  4. 不傳: debug 模式關閉
zouber commented 10 years ago

僅為備忘, 實作已完成, close