journal: Add log level argument to journal_file_rotate_suggested()
When journald is rotating a file, we'd like to log the reason at LOG_INFO or higher instead of LOG_DEBUG. For journalctl --header, logging the reason at a level higher than LOG_DEBUG doesn't really make sense. To accomodate both use cases, make the log level used by journal_file_rotate_suggested() configurable.
This commit is contained in:
@@ -819,7 +819,7 @@ static void write_to_journal(Server *s, uid_t uid, struct iovec *iovec, size_t n
|
||||
if (!f)
|
||||
return;
|
||||
|
||||
if (journal_file_rotate_suggested(f, s->max_file_usec)) {
|
||||
if (journal_file_rotate_suggested(f, s->max_file_usec, LOG_DEBUG)) {
|
||||
log_debug("%s: Journal header limits reached or header out-of-date, rotating.", f->path);
|
||||
rotate = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user