Error logging

This commit is contained in:
spikecodes 2021-01-15 10:58:53 -08:00
parent 0c014ad41b
commit bca2a7e540
2 changed files with 2 additions and 2 deletions

View File

@ -123,7 +123,7 @@ Results from Google Lighthouse ([Libreddit Report](https://lighthouse-dot-webdot
For transparency, I hope to describe all the ways Libreddit handles user privacy. For transparency, I hope to describe all the ways Libreddit handles user privacy.
**Logging:** In production (when running the binary, hosting with docker, or using the official instances), Libreddit logs nothing. When debugging (running from source without `--release`), Libreddit logs post IDs and URL paths fetched to aid troubleshooting but nothing else. **Logging:** In production (when running the binary, hosting with docker, or using the official instances), Libreddit logs errors. When debugging (running from source without `--release`), Libreddit logs post IDs and URL paths fetched to aid with troubleshooting.
**DNS:** Both official domains (`libredd.it` and `libreddit.spike.codes`) use Cloudflare as the DNS resolver. Though, the sites are not proxied through Cloudflare meaning Cloudflare doesn't have access to user traffic. **DNS:** Both official domains (`libredd.it` and `libreddit.spike.codes`) use Cloudflare as the DNS resolver. Though, the sites are not proxied through Cloudflare meaning Cloudflare doesn't have access to user traffic.

View File

@ -388,7 +388,7 @@ pub async fn request(path: &str) -> Result<Value, String> {
// Print error if debugging then return error based on error message // Print error if debugging then return error based on error message
fn err(url: String, msg: String) -> Result<Value, String> { fn err(url: String, msg: String) -> Result<Value, String> {
#[cfg(debug_assertions)] // #[cfg(debug_assertions)]
dbg!(format!("{} - {}", url, msg)); dbg!(format!("{} - {}", url, msg));
Err(msg) Err(msg)
}; };