summaryrefslogtreecommitdiff
path: root/src/journal/journald.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/journal/journald.c')
-rw-r--r--src/journal/journald.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/journal/journald.c b/src/journal/journald.c
index 37f8f16754..ca274ee44a 100644
--- a/src/journal/journald.c
+++ b/src/journal/journald.c
@@ -57,6 +57,7 @@ typedef struct Server {
JournalMetrics metrics;
uint64_t max_use;
+ bool compress;
} Server;
static void fix_perms(JournalFile *f, uid_t uid) {
@@ -146,6 +147,8 @@ static JournalFile* find_journal(Server *s, uid_t uid) {
return s->system_journal;
fix_perms(f, uid);
+ f->metrics = s->metrics;
+ f->compress = s->compress;
r = hashmap_put(s->user_journals, UINT32_TO_PTR(uid), f);
if (r < 0) {
@@ -661,6 +664,9 @@ static int system_journal_open(Server *s) {
free(fn);
if (r >= 0) {
+ s->system_journal->metrics = s->metrics;
+ s->system_journal->compress = s->compress;
+
fix_perms(s->system_journal, 0);
return r;
}
@@ -685,6 +691,9 @@ static int system_journal_open(Server *s) {
return r;
}
+ s->runtime_journal->metrics = s->metrics;
+ s->runtime_journal->compress = s->compress;
+
fix_perms(s->runtime_journal, 0);
return r;
}
@@ -794,6 +803,7 @@ static int server_init(Server *s) {
s->metrics.min_size = DEFAULT_MIN_SIZE;
s->metrics.keep_free = DEFAULT_KEEP_FREE;
s->max_use = DEFAULT_MAX_USE;
+ s->compress = true;
s->epoll_fd = epoll_create1(EPOLL_CLOEXEC);
if (s->epoll_fd < 0) {
@@ -931,6 +941,7 @@ int main(int argc, char *argv[]) {
}
log_set_target(LOG_TARGET_CONSOLE);
+ log_set_max_level(LOG_DEBUG);
log_parse_environment();
log_open();