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
- Extract GraylogOptions into its own struct, independent of TracingOptions
- Remove .vscode/launch.json (to be added in a separate PR)
- Remove version/build additional_field calls from Graylog logger
- Switch let-else to if-let in init_graylog
- Warn when Graylog URL has no port rather than silently defaulting
- Add reconnect loop so dropped connections recover automatically
- Improve connection error messages to distinguish DNS failure from TCP errors
.ok_or_else(|| format!("Graylog URL '{}' has no port - please specify a port (e.g. tcp://{}:12201)", endpoint, endpoint.host_str().unwrap_or("host")))?;
72
+
Ok(Some(format!("{}:{}", endpoint.host_str().expect("Graylog URL has no host"), port)))
73
+
}
52
74
}
53
75
54
76
#[derive(Debug,Subcommand)]
@@ -163,15 +185,9 @@ impl TracingOptions {
163
185
pub(crate)fntracing_url(&self) -> Option<Url>{
164
186
self.tracing_url.clone()
165
187
}
166
-
pub(crate)fnlevel(&self) -> Level{
188
+
pub(crate)fnlevel(&self) -> Level{
167
189
self.tracing_level
168
190
}
169
-
pub(crate)fngraylog_url(&self) -> Option<Url>{
170
-
self.graylog_url.clone()
171
-
}
172
-
pub(crate)fnlogging_level(&self) -> Level{
173
-
self.logging_level
174
-
}
175
191
}
176
192
177
193
#[cfg(test)]
@@ -351,10 +367,10 @@ mod tests {
351
367
let cli = Cli::try_parse_from([APP,"--graylog","tcp://graylog.example.com:12201","serve"])
0 commit comments