summaryrefslogtreecommitdiffstats
path: root/plugins/c8y_log_plugin/src/main.rs
diff options
context:
space:
mode:
authorinitard <solo@softwareag.com>2022-05-20 15:51:19 +0100
committerinitard <solo@softwareag.com>2022-05-20 16:09:23 +0100
commitc325c533aa6c05f73b26f8d8569b199b81b84edf (patch)
tree083137ff8fc03e6387e1a6914b753b984bf36ebb /plugins/c8y_log_plugin/src/main.rs
parentbcf887cb468c04271bf38e06a904da5e615f382e (diff)
logs are read in reverse and use modified date
- logs are now read in reverse order into a VecDeque - log files now use metadata for modified time Signed-off-by: initard <solo@softwareag.com>
Diffstat (limited to 'plugins/c8y_log_plugin/src/main.rs')
-rw-r--r--plugins/c8y_log_plugin/src/main.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/c8y_log_plugin/src/main.rs b/plugins/c8y_log_plugin/src/main.rs
index e6c05693..90b16946 100644
--- a/plugins/c8y_log_plugin/src/main.rs
+++ b/plugins/c8y_log_plugin/src/main.rs
@@ -95,7 +95,7 @@ async fn run(
mqtt_client: &mut Connection,
http_client: &mut JwtAuthHttpProxy,
) -> Result<(), anyhow::Error> {
- let () = handle_dynamic_log_type_update(mqtt_client, config_file).await?;
+ let mut plugin_config = handle_dynamic_log_type_update(mqtt_client, config_file).await?;
let mut inotify_stream = create_inofity_file_watch_stream(config_file)?;
@@ -110,7 +110,7 @@ async fn run(
let smartrest_obj = SmartRestLogRequest::from_smartrest(&payload)?;
handle_logfile_request_operation(
&smartrest_obj,
- &config_file,
+ &plugin_config,
mqtt_client,
http_client,
)
@@ -136,7 +136,7 @@ async fn run(
if let Ok(event) = event_or_error {
match event.mask {
EventMask::CLOSE_WRITE => {
- let () = handle_dynamic_log_type_update(mqtt_client, config_file).await?;
+ plugin_config = handle_dynamic_log_type_update(mqtt_client, config_file).await?;
}
_ => {}
}