Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
b66add5
fix logs not having the prefixes correct
CommanderStorm Feb 10, 2026
aa03173
Update martin/src/bin/martin.rs
CommanderStorm Feb 10, 2026
03887dc
Update martin/src/bin/martin.rs
CommanderStorm Feb 10, 2026
e1ce638
chore(fmt): apply pre-commit formatting fixes
pre-commit-ci[bot] Feb 10, 2026
097874b
Apply suggestions from code review
CommanderStorm Feb 11, 2026
ed4fbad
Apply suggestion from @CommanderStorm
CommanderStorm Feb 11, 2026
3a26869
Apply suggestions from code review
CommanderStorm Feb 11, 2026
406b34e
Apply suggestion from @CommanderStorm
CommanderStorm Feb 11, 2026
80c2a95
Apply suggestion from @CommanderStorm
CommanderStorm Feb 11, 2026
5a972f8
Apply suggestion from @CommanderStorm
CommanderStorm Feb 11, 2026
e5229c1
chore(fmt): apply pre-commit formatting fixes
pre-commit-ci[bot] Feb 11, 2026
b0bd2d5
Merge branch 'main' into prefix-aware-logs
CommanderStorm Feb 11, 2026
ab96a31
minor text improvements
nyurik Feb 11, 2026
a289c6e
chore(fmt): apply pre-commit formatting fixes
pre-commit-ci[bot] Feb 11, 2026
e06cf46
Apply suggestions from code review
CommanderStorm Feb 11, 2026
a011ef3
Apply suggestion from @CommanderStorm
CommanderStorm Feb 11, 2026
644dbdb
chore(fmt): apply pre-commit formatting fixes
pre-commit-ci[bot] Feb 11, 2026
79098f0
Apply suggestion from @CommanderStorm
CommanderStorm Feb 11, 2026
7ef16a8
Apply suggestion from @CommanderStorm
CommanderStorm Feb 11, 2026
1e1fedc
chore(fmt): apply pre-commit formatting fixes
pre-commit-ci[bot] Feb 11, 2026
f277205
Apply suggestion from @CommanderStorm
CommanderStorm Feb 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions martin/src/bin/martin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,24 @@ async fn start(args: Args) -> MartinResult<()> {
#[cfg(all(feature = "webui", not(docsrs)))]
let web_ui_mode = config.srv.web_ui.unwrap_or_default();

let route_prefix = config.srv.route_prefix.clone();
let (server, listen_addresses) = new_server(config.srv, sources)?;
info!("Martin has been started on {listen_addresses}.");
info!("Use http://{listen_addresses}/catalog to get the list of available sources.");
let base_url = if let Some(ref prefix) = route_prefix {
format!("http://{listen_addresses}{prefix}/")
} else {
format!("http://{listen_addresses}/")
};

#[cfg(all(feature = "webui", not(docsrs)))]
if web_ui_mode == martin::config::args::WebUiMode::EnableForAll {
tracing::warn!("Web UI is enabled for all connections at http://{listen_addresses}/");
tracing::info!("Martin server is now active at {base_url}");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we use both info! and tracing::info! in the same file?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this here is guarded by the cfg, the other is imported actually.

Since we have the no-unused imports, it is either this or ugly/hard to maintain cfg imports at the top

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we may want to even add a comment about that - as i think i caught this one before too :)

} else {
info!(
"Web UI is disabled. Use `--webui enable-for-all` in CLI or a config value to enable it for all connections."
);
}
#[cfg(not(all(feature = "webui", not(docsrs))))]
info!("Martin server is now active. See {base_url}catalog to see available services");

server.await
}
Expand Down
3 changes: 1 addition & 2 deletions martin/src/srv/tiles/content.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ use tracing::warn;
use crate::config::args::PreferredEncoding;
use crate::config::file::srv::SrvConfig;
use crate::source::TileSources;
use crate::srv::server::DebouncedWarning;
use crate::srv::server::map_internal_error;
use crate::srv::server::{DebouncedWarning, map_internal_error};

const SUPPORTED_ENC: &[HeaderEnc] = &[
HeaderEnc::gzip(),
Expand Down
Loading