Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions plugins/processor_content_modifier/cm_logs.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ static int run_action_insert(struct content_modifier_ctx *ctx,
ret = cfl_kvlist_insert_string_s(kvlist, key, cfl_sds_len(key), value, cfl_sds_len(value),
CFL_FALSE);
if (ret != 0) {
printf("Failed to insert key: %s\n", key);
flb_plg_debug(ctx->ins, "[action: insert] failed to insert key: %s", key);
return -1;
}
return 0;
Expand Down Expand Up @@ -451,7 +451,10 @@ static int run_action_delete(struct content_modifier_ctx *ctx,
return 0;
}

return -1;
flb_plg_debug(ctx->ins, "[action: delete] key '%s' not found", key);

/* if the kvpair was not found, it's ok, we return zero */
return 0;
}

static int run_action_rename(struct content_modifier_ctx *ctx,
Expand All @@ -465,7 +468,8 @@ static int run_action_rename(struct content_modifier_ctx *ctx,
/* if the kv pair already exists, remove it from the list */
kvpair = cfl_object_kvpair_get(obj, key);
if (!kvpair) {
return -1;
flb_plg_debug(ctx->ins, "[action: rename] key '%s' not found", key);
return 0;
}

tmp = kvpair->key;
Expand Down