diff --git a/src/meta_plugin/hostname.rs b/src/meta_plugin/hostname.rs index c9d51b7..ec40e66 100644 --- a/src/meta_plugin/hostname.rs +++ b/src/meta_plugin/hostname.rs @@ -118,14 +118,20 @@ impl MetaPlugin for HostnameMetaPlugin { .and_then(|v| v.as_bool()) .unwrap_or(true); // Default to true + log::debug!("HOSTNAME: use_full option: {:?}", use_full); + + let full_hostname = self.get_hostname(); + log::debug!("HOSTNAME: full hostname from system: {:?}", full_hostname); + let hostname = if use_full { - self.get_hostname() + full_hostname.clone() } else { // Get short hostname (first part before the first dot) - let full_hostname = self.get_hostname(); full_hostname.split('.').next().unwrap_or(&full_hostname).to_string() }; + log::debug!("HOSTNAME: final hostname to use: {:?}", hostname); + // Use process_metadata_outputs to handle output mapping if let Some(meta_data) = crate::meta_plugin::process_metadata_outputs( "hostname",