💾 Archived View for 80h.dev › projects › gemserv › files › src › logger.rs.gemini captured on 2022-06-12 at 00:48:43. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2022-03-01)

-=-=-=-=-=-=-

01 use crate::status;

02 use log::{info, warn};

03 use std::net::SocketAddr;

04

05 pub fn logger(addr: SocketAddr, stat: status::Status, req: &str) {

06 match stat as u8 {

07 20..=29 => info!("remote={} status={} request={}", addr, stat as u8, req),

08 _ => warn!("remote={} status={} request={}", addr, stat as u8, req),

09 }

10 }