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 <[email protected]>
  • Loading branch information
PettitWesley committed May 28, 2024
1 parent bfc16be commit 9245d0d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions 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

0 comments on commit 9245d0d

Please sign in to comment.