Crates.io | driftwood |
lib.rs | driftwood |
version | 0.0.7 |
source | src |
created_at | 2020-09-05 07:39:38.592378 |
updated_at | 2022-11-07 21:43:57.960536 |
description | a log on the tide |
homepage | |
repository | https://github.com/jbr/driftwood |
max_upload_size | |
id | 284977 |
size | 19,405 |
$ cargo add driftwood
This crate currently provides three loggers:
let mut app = tide::new();
app.with(driftwood::ApacheCommonLogger);
Example:
127.0.0.1 - frank [10/Oct/2000:13:55:36 -0700] "GET /apache_pb.gif HTTP/1.0" 200 2326
let mut app = tide::new();
app.with(driftwood::ApacheCombinedLogger);
Example:
127.0.0.1 - frank [10/Oct/2000:13:55:36 -0700] "GET /apache_pb.gif HTTP/1.0" 200 2326 "http://www.example.com/start.html" "Mozilla/4.08 [en] (Win98; I ;Nav)"
let mut app = tide::new();
app.with(driftwood::DevLogger);
This logger colors the status code based on the status range and is intended to be read by people
Example:
GET http://localhost:8080/some/path 200 3.289292ms 227bytes
This crate intends to support much of the functionality in morgan including custom log formats and may eventually support writing to outputs other than stdout.
This crate uses #![deny(unsafe_code)]
to ensure everything is implemented in
100% Safe Rust.