mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-11-24 18:36:59 +03:00
Updated Debug mode (markdown)
parent
ecc6058161
commit
748feeb3e2
1 changed files with 21 additions and 5 deletions
|
@ -1,11 +1,27 @@
|
|||
The debug mode enables error reporting and prevents loading data from the cache. The cache will still be written to disk!
|
||||
<h1 align="center">Warning!</h1>
|
||||
|
||||
To enable debug mode, create an empty file named `DEBUG` in the root directory (next to `index.php`).
|
||||
Enabling debug mode on a public server may result in malicious clients retrieving sensitive data about your server and possibly gaining access to it. Do not enable debug mode on a public server, unless you understand the implications of your doing!
|
||||
|
||||
You can limit the debug mode to certain clients by writing the IP addresses into the DEBUG file (one per line).
|
||||
***
|
||||
|
||||
**Notice:** The whitelist still applies!
|
||||
Debug mode enables error reporting and prevents loading data from the cache (data is still written to the cache).
|
||||
To enable debug mode, create a file named 'DEBUG' in the root directory of RSS-Bridge (next to `index.php`). For further security, insert your IP address in the file. You can add multiple addresses, one per line.
|
||||
|
||||
RSS-Bridge will give you a visual feedback when `DEBUG` mode is active:
|
||||
_Notice_:
|
||||
|
||||
* An empty file enables debug mode for anyone!
|
||||
* The bridge whitelist still applies! (debug mode does **not** enable all bridges)
|
||||
|
||||
RSS-Bridge will give you a visual feedback when debug mode is enabled:
|
||||
|
||||
[[https://cloud.githubusercontent.com/assets/5776685/19022134/fac1bfce-88d0-11e6-8a63-aeb4de9895d5.png]]
|
||||
|
||||
While debug mode is active, RSS-Bridge will write additional data to your servers `error.log`.
|
||||
|
||||
Debug mode is controlled by the static class `Debug`. It provides three core functions:
|
||||
|
||||
`Debug::isEnabled()`: Returns `true` if debug mode is enabled.
|
||||
`Debug::isSecure()`: Returns `true` if your client is on the debug whitelist.
|
||||
`Debug::log($message)`: Adds a message to `error.log`. It takes one parameter, which can be anything. For example: `Debug::log('Hello World!');`
|
||||
|
||||
**Notice**: `Debug::log($message)` calls `Debug::isEnabled()` internally. You don't have to do that manually.
|
Loading…
Reference in a new issue