https://github.com/ym-project/actix-logger-light
Light logger middleware for actix-web
https://github.com/ym-project/actix-logger-light
actix actix-web logger middleware
Last synced: 4 months ago
JSON representation
Light logger middleware for actix-web
- Host: GitHub
- URL: https://github.com/ym-project/actix-logger-light
- Owner: ym-project
- License: mit
- Created: 2026-03-23T12:48:23.000Z (4 months ago)
- Default Branch: v4
- Last Pushed: 2026-03-29T16:19:06.000Z (4 months ago)
- Last Synced: 2026-03-29T17:39:19.164Z (4 months ago)
- Topics: actix, actix-web, logger, middleware
- Language: Rust
- Homepage:
- Size: 29.3 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Actix logger light
Fork of [build-in actix-web logger middleware](https://github.com/actix/actix-web/blob/b9d3adfa4d4b70d2a110897adb2207f97e074a77/actix-web/src/middleware/logger.rs).
Purposes:
- remove default error logging. Actix's logger marks errors as DEBUG and there is no way to customize this behavior. See [issue](https://github.com/actix/actix-web/issues/2637)
- remove formatting in favor of single hardcoded format `%a "%r" %s %b "%{Referer}i" "%{User-Agent}i" %T`
output example: `127.0.0.1 "GET /test HTTP/1.1" 404 20 "-" "HTTPie/2.2.0" 0.001074`
Use it if you want to speed up your server a little and don't need to customize log output.
## Installation
```sh
cargo add actix-logger-light
```
## Example
```rs
use actix_web::{App};
use actix_logger_light::Logger;
// Init logger using env_logger or similar crate
env_logger::init_from_env(env_logger::Env::new().default_filter_or("info"));
let app = App::new().wrap(Logger::default());
```
## License
This project is licensed under of MIT license ([LICENSE](LICENSE) or [https://opensource.org/licenses/MIT](https://opensource.org/licenses/MIT))