mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-09-16 06:42:02 +02:00
Show a web proxy startup message by default
This commit is contained in:
@@ -96,7 +96,7 @@ arguments; `--help` lists them all.
|
||||
|
||||
## Logging
|
||||
|
||||
Default logs contain operational warnings and errors, not request URLs, client IPs,
|
||||
Default logs contain a startup message and operational warnings and errors, not request URLs, client IPs,
|
||||
DNS lookups, or per-request timing. To diagnose a self-hosted instance, opt in with
|
||||
`RUST_LOG=warn,yaak_http=error,yaak_web=debug`. This includes request URLs and IPs,
|
||||
so only enable it while debugging. Hosting infrastructure may maintain its own
|
||||
|
||||
@@ -41,7 +41,7 @@ use tower_http::services::{ServeDir, ServeFile};
|
||||
use wire::SendRequest;
|
||||
|
||||
/// Minimal operational logging; request diagnostics require an explicit `RUST_LOG` setting.
|
||||
pub const DEFAULT_LOG_FILTER: &str = "warn,yaak_http=error";
|
||||
pub const DEFAULT_LOG_FILTER: &str = "warn,yaak_http=error,yaak_web::startup=info";
|
||||
|
||||
#[derive(Clone)]
|
||||
struct AppState {
|
||||
|
||||
@@ -20,7 +20,7 @@ async fn main() {
|
||||
eprintln!("Failed to bind {bind}: {e}");
|
||||
std::process::exit(1);
|
||||
});
|
||||
info!("yaak-web listening on http://{bind} (rate limit: {}/min)", rate_limit_per_minute,);
|
||||
info!(target: "yaak_web::startup", "yaak-web listening on http://{bind} (rate limit: {}/min)", rate_limit_per_minute,);
|
||||
|
||||
axum::serve(listener, app.into_make_service_with_connect_info::<SocketAddr>())
|
||||
.with_graceful_shutdown(async {
|
||||
|
||||
Reference in New Issue
Block a user