chiark / gitweb /
journald: copy metrics/compression state from template when rotating
[elogind.git] / src / journal / journal-file.c
index 7f5d7c27b21d22823f4d4fa937cfb4cd20365cb1..a784a3391b9271cdfc7b612957e9570ec1146ec7 100644 (file)
@@ -1740,6 +1740,11 @@ int journal_file_open(
         f->writable = (flags & O_ACCMODE) != O_RDONLY;
         f->prot = prot_from_flags(flags);
 
+        if (template) {
+                f->metrics = template->metrics;
+                f->compress = template->compress;
+        }
+
         f->path = strdup(fname);
         if (!f->path) {
                 r = -ENOMEM;