You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR ensures the detect schema API used
for detecting the schema of a given JSON file
returns the exact, flattened schema as server
would store the event.
Copy file name to clipboardExpand all lines: src/cli.rs
+6-11Lines changed: 6 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -563,8 +563,7 @@ impl Options {
563
563
}else{
564
564
if endpoint.starts_with("http"){
565
565
panic!(
566
-
"Invalid value `{}`, please set the environment variable `{}` to `<ip address / DNS>:<port>` without the scheme (e.g., 192.168.1.1:8000 or example.com:8000). Please refer to the documentation: https://logg.ing/env for more details.",
567
-
endpoint, env_var
566
+
"Invalid value `{endpoint}`, please set the environment variable `{env_var}` to `<ip address / DNS>:<port>` without the scheme (e.g., 192.168.1.1:8000 or example.com:8000). Please refer to the documentation: https://logg.ing/env for more details.",
568
567
);
569
568
}
570
569
endpoint.to_string()
@@ -579,15 +578,14 @@ impl Options {
579
578
580
579
if addr_parts.len() != 2{
581
580
panic!(
582
-
"Invalid value `{}`, please set the environment variable to `<ip address / DNS>:<port>` without the scheme (e.g., 192.168.1.1:8000 or example.com:8000). Please refer to the documentation: https://logg.ing/env for more details.",
583
-
endpoint
581
+
"Invalid value `{endpoint}`, please set the environment variable to `<ip address / DNS>:<port>` without the scheme (e.g., 192.168.1.1:8000 or example.com:8000). Please refer to the documentation: https://logg.ing/env for more details."
584
582
);
585
583
}
586
584
587
585
let hostname = self.resolve_env_var(addr_parts[0]);
588
586
let port = self.resolve_env_var(addr_parts[1]);
589
587
590
-
self.build_url(&format!("{}:{}", hostname, port))
588
+
self.build_url(&format!("{hostname}:{port}"))
591
589
}
592
590
593
591
/// resolve the env var
@@ -597,15 +595,13 @@ impl Options {
597
595
ifletSome(env_var) = value.strip_prefix('$'){
598
596
let resolved_value = env::var(env_var).unwrap_or_else(|_| {
599
597
panic!(
600
-
"The environment variable `{}` is not set. Please set it to a valid value. Refer to the documentation: https://logg.ing/env for more details.",
601
-
env_var
598
+
"The environment variable `{env_var}` is not set. Please set it to a valid value. Refer to the documentation: https://logg.ing/env for more details."
602
599
);
603
600
});
604
601
605
602
if resolved_value.starts_with("http"){
606
603
panic!(
607
-
"Invalid value `{}`, please set the environment variable `{}` to `<ip address / DNS>` without the scheme (e.g., 192.168.1.1 or example.com). Please refer to the documentation: https://logg.ing/env for more details.",
608
-
resolved_value, env_var
604
+
"Invalid value `{resolved_value}`, please set the environment variable `{env_var}` to `<ip address / DNS>` without the scheme (e.g., 192.168.1.1 or example.com). Please refer to the documentation: https://logg.ing/env for more details.",
609
605
);
610
606
}
611
607
@@ -621,8 +617,7 @@ impl Options {
621
617
.parse::<Url>()
622
618
.unwrap_or_else(|err| {
623
619
panic!(
624
-
"{err}, failed to parse `{}` as Url. Please set the environment variable `P_ADDR` to `<ip address>:<port>` without the scheme (e.g., 192.168.1.1:8000). Please refer to the documentation: https://logg.ing/env for more details.",
625
-
address
620
+
"{err}, failed to parse `{address}` as Url. Please set the environment variable `P_ADDR` to `<ip address>:<port>` without the scheme (e.g., 192.168.1.1:8000). Please refer to the documentation: https://logg.ing/env for more details."
0 commit comments