From 659fc38bc2197091a062d6f1d08790cbda586ace Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 10 Nov 2018 16:08:41 +0100 Subject: main(): Write request debug output to log file Stop writing this information to the response text and instead put it in the program log file. Don't want to send back unnecessary information when testing the Paddle webhook. --- license-generator/src/main.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'license-generator/src') diff --git a/license-generator/src/main.rs b/license-generator/src/main.rs index 2211d6e..7d89723 100644 --- a/license-generator/src/main.rs +++ b/license-generator/src/main.rs @@ -54,18 +54,15 @@ fn main() -> Result<()> { params.push_str(format!("{}: {}\n", key, val).as_str()); } - write!(&mut req.stdout(), "\n\n{}", params) - .unwrap_or(()); + info!("{}", params); let mut stdin = String::new(); req.stdin().read_to_string(&mut stdin).unwrap(); - write!(&mut req.stdout(), "\n\nstdin: {}\n", stdin) - .unwrap_or(()); + info!("{}", stdin); let is_verified = request::verified(&stdin); - write!(&mut req.stdout(), "\n{:?}\n", is_verified) - .unwrap_or(()); + info!("{:?}", is_verified); }); Ok(()) -- cgit v1.2.3