Skip to content

Commit

Permalink
engine: dump chunks on shutdown if log level is debug`
Browse files Browse the repository at this point in the history
Signed-off-by: Wesley Pettit <wppttt@amazon.com>
  • Loading branch information
PettitWesley committed May 28, 2024
1 parent bfc16be commit 85b13c0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/flb_engine.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <fluent-bit/flb_time.h>
#include <fluent-bit/flb_info.h>
#include <fluent-bit/flb_bits.h>
#include <fluent-bit/flb_dump.h>

#include <fluent-bit/flb_macros.h>
#include <fluent-bit/flb_pipe.h>
Expand Down Expand Up @@ -819,6 +820,11 @@ int flb_engine_start(struct flb_config *config)
/* Increase the grace counter */
config->grace_count++;

/* Dump buffer status on shutdown if in debug */
if (config->verbose == FLB_LOG_DEBUG) {
flb_dump(config);
}

/*
* Grace period has finished, but we need to check if there is
* any pending running task. A running task is associated to an
Expand Down Expand Up @@ -979,7 +985,7 @@ void flb_engine_stop_ingestion(struct flb_config *config)
config->is_ingestion_active = FLB_FALSE;
config->is_shutting_down = FLB_TRUE;

flb_info("flb_engine_stop_ingestion()");
flb_info("[engine] pausing all inputs..");

flb_input_pause_all(config);
}
Expand Down

0 comments on commit 85b13c0

Please sign in to comment.