Implemented proper logging, with support for file logging, timestamp and syslog (this last one is untested)

This commit is contained in:
Daniel García
2018-12-06 20:35:25 +01:00
parent 259a2f2982
commit 2fde4e6933
13 changed files with 146 additions and 29 deletions

View File

@ -51,7 +51,7 @@ pub fn decode_jwt(token: &str) -> Result<JWTClaims, String> {
match jwt::decode(token, &PUBLIC_RSA_KEY, &validation) {
Ok(decoded) => Ok(decoded.claims),
Err(msg) => {
println!("Error validating jwt - {:#?}", msg);
error!("Error validating jwt - {:#?}", msg);
Err(msg.to_string())
}
}