Skip to content

Conversation

@CommanderStorm
Copy link
Member

@CommanderStorm CommanderStorm commented Mar 12, 2025

This is the first PR to break out of #1720 to make it reviewable.

The purpose is mainly to see if the added utilities are

  • read & undaerstandable
  • not magic for others and
  • not too verbose
  • and the name martin-tracing-utils okay.

Current usage of this code would be

// since logging is not yet available, we have to manually check the locations
let log_filter = LogLevel::from_argument("--log-level")
    .or_in_config_file("--config", "log_level")
    .or_env_var("MARTIN_LOG_FORMAT")
    .lossy_parse_to_filter_with_default("martin=info");
let log_format = LogFormat::from_argument("--log-level")
    .or_in_config_file("--config", "log_format")
    .or_env_var("RUST_LOG")
    .or_default(LogFormatOptions::Compact);
MartinObservability::from((log_filter, log_format))
    .with_initialised_log_tracing()
    .set_global_subscriber();

@CommanderStorm CommanderStorm requested a review from nyurik March 25, 2025 02:08

This comment was marked as resolved.

@sharkAndshark sharkAndshark requested a review from Copilot May 6, 2025 02:45

This comment was marked as resolved.

@CommanderStorm
Copy link
Member Author

CommanderStorm commented May 10, 2025

@nyurik @sharkAndshark might it be possible to get an review on this one? 👉🏻👈🏻

This would really help me push towards #1720 which (for me) currently kind of blocks the refactoring #1805 (comment)

@CommanderStorm
Copy link
Member Author

We talked this out offliline and we will move this to different places:

  • intialise a basic tracing
  • take the configuration from the existing config
  • update the running tracing config

I will reasses if this works and come back with a different PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant