diff options
Diffstat (limited to 'src/collectors/log2journal/log2journal-inject.c')
-rw-r--r-- | src/collectors/log2journal/log2journal-inject.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/collectors/log2journal/log2journal-inject.c b/src/collectors/log2journal/log2journal-inject.c index 45158066b..f1a70ac8b 100644 --- a/src/collectors/log2journal/log2journal-inject.c +++ b/src/collectors/log2journal/log2journal-inject.c @@ -9,12 +9,13 @@ void injection_cleanup(INJECTION *inj) { static inline bool log_job_injection_replace(INJECTION *inj, const char *key, size_t key_len, const char *value, size_t value_len) { if(key_len > JOURNAL_MAX_KEY_LEN) - log2stderr("WARNING: injection key '%.*s' is too long for journal. Will be truncated.", (int)key_len, key); + l2j_log("WARNING: injection key '%.*s' is too long for journal. Will be truncated.", (int)key_len, key); if(value_len > JOURNAL_MAX_VALUE_LEN) - log2stderr("WARNING: injection value of key '%.*s' is too long for journal. Will be truncated.", (int)key_len, key); + l2j_log( + "WARNING: injection value of key '%.*s' is too long for journal. Will be truncated.", (int)key_len, key); - hashed_key_len_set(&inj->key, key, key_len); + hashed_key_set(&inj->key, key, key_len); char *v = strndupz(value, value_len); bool ret = replace_pattern_set(&inj->value, v); freez(v); @@ -25,13 +26,13 @@ static inline bool log_job_injection_replace(INJECTION *inj, const char *key, si bool log_job_injection_add(LOG_JOB *jb, const char *key, size_t key_len, const char *value, size_t value_len, bool unmatched) { if (unmatched) { if (jb->unmatched.injections.used >= MAX_INJECTIONS) { - log2stderr("Error: too many unmatched injections. You can inject up to %d lines.", MAX_INJECTIONS); + l2j_log("Error: too many unmatched injections. You can inject up to %d lines.", MAX_INJECTIONS); return false; } } else { if (jb->injections.used >= MAX_INJECTIONS) { - log2stderr("Error: too many injections. You can inject up to %d lines.", MAX_INJECTIONS); + l2j_log("Error: too many injections. You can inject up to %d lines.", MAX_INJECTIONS); return false; } } |