Disable production error logging

This commit is contained in:
spikecodes 2021-01-16 15:17:08 -08:00
parent 0e48c66b8c
commit 471d181284
2 changed files with 2 additions and 1 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.
**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.
**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 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.

View File

@ -455,6 +455,7 @@ pub async fn request(path: &str) -> Result<Value, String> {
}
// If failed to send request
Err(e) => {
#[cfg(debug_assertions)]
dbg!(format!("{} - {}", url, e));
Err("Couldn't send request to Reddit, this instance may be being rate-limited. Try another.".to_string())
}