From bca2a7e54044204d04aa2ecbc64f2bc3998260ea Mon Sep 17 00:00:00 2001 From: spikecodes <19519553+spikecodes@users.noreply.github.com> Date: Fri, 15 Jan 2021 10:58:53 -0800 Subject: [PATCH] Error logging --- README.md | 2 +- src/utils.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9128667..c10c1c8 100644 --- a/README.md +++ b/README.md @@ -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 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. diff --git a/src/utils.rs b/src/utils.rs index 1f4206a..1af0d73 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -388,7 +388,7 @@ pub async fn request(path: &str) -> Result { // Print error if debugging then return error based on error message fn err(url: String, msg: String) -> Result { - #[cfg(debug_assertions)] + // #[cfg(debug_assertions)] dbg!(format!("{} - {}", url, msg)); Err(msg) };