if (JOURNAL_HEADER_CONTAINS(f->header, n_data) &&
JOURNAL_HEADER_CONTAINS(f->header, n_fields) &&
le64toh(f->header->n_data) > 0 &&
- le64toh(f->header->n_fields) == 0)
+ le64toh(f->header->n_fields) == 0) {
+ log_full(log_level,
+ "Data objects of %s are not indexed by field objects, suggesting rotation.",
+ f->path);
return true;
+ }
if (max_file_usec > 0) {
usec_t t, h;
h = le64toh(f->header->head_entry_realtime);
t = now(CLOCK_REALTIME);
- if (h > 0 && t > h + max_file_usec)
+ if (h > 0 && t > h + max_file_usec) {
+ log_full(log_level,
+ "Oldest entry in %s is older than the configured file retention duration (%s), suggesting rotation.",
+ f->path, FORMAT_TIMESPAN(max_file_usec, USEC_PER_SEC));
return true;
+ }
}
return false;