Date: Fri, 10 Aug 2007 14:19:55 +0300 From: Artis Caune <Artis.Caune@latnet.lv> To: FreeBSD-hackers@FreeBSD.org Subject: [PATCH] newsyslog - don't compress first log file Message-ID: <46BC49DB.8060509@latnet.lv>
next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------030103040208010004050309 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit How about aditional flag ("X") to newsyslog, which don't compress first log file? This is useful for apache. # cat /etc/newsyslog.conf /var/log/httpd-access.log www:www 640 64 * $W1D0 BCZX /var/run/httpd.pid 30 # ls /var/log/archive2/ httpd-access.log.0 httpd-access.log.1.gz httpd-access.log.2.gz httpd-access.log.3.gz --------------030103040208010004050309 Content-Type: text/plain; name="newsyslog.patch" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="newsyslog.patch" LS0tIG5ld3N5c2xvZy5jLm9yaWcJVGh1IEF1ZyAxNyAwNDoyMDozNiAyMDA2CisrKyBuZXdz eXNsb2cuYwlGcmkgQXVnIDEwIDEzOjU5OjUzIDIwMDcKQEAgLTEwNCw2ICsxMDQsOCBAQAog I2RlZmluZQlDRV9DUkVBVEUJMHgwMTAwCS8qIENyZWF0ZSB0aGUgbG9nIGZpbGUgaWYgaXQg ZG9lcyBub3QgZXhpc3QuICovCiAjZGVmaW5lCUNFX05PRFVNUAkweDAyMDAJLyogU2V0ICdu b2R1bXAnIG9uIG5ld2x5IGNyZWF0ZWQgbG9nIGZpbGUuICovCiAKKyNkZWZpbmUgQ0VfTk9D T01QQUNUMQkweDA0MDAgIC8qIERvbid0IGNvbXBhY3QgZmlyc3QgbG9nIGZpbGUuICovCisK ICNkZWZpbmUJTUlOX1BJRCAgICAgICAgIDUJLyogRG9uJ3QgdG91Y2ggcGlkcyBsb3dlciB0 aGFuIHRoaXMgKi8KICNkZWZpbmUJTUFYX1BJRAkJOTk5OTkJLyogd2FzIGxvd2VyLCBzZWUg L3Vzci9pbmNsdWRlL3N5cy9wcm9jLmggKi8KIApAQCAtMTIyOCw2ICsxMjMwLDkgQEAKIAkJ CWNhc2UgJ3onOgogCQkJCXdvcmtpbmctPmZsYWdzIHw9IENFX0NPTVBBQ1Q7CiAJCQkJYnJl YWs7CisJCQljYXNlICd4JzoKKwkJCQl3b3JraW5nLT5mbGFncyB8PSBDRV9OT0NPTVBBQ1Qx OworCQkJCWJyZWFrOwogCQkJY2FzZSAnLSc6CiAJCQkJYnJlYWs7CiAJCQljYXNlICdmJzoJ LyogVXNlZCBieSBPcGVuQlNEIGZvciAiQ0VfRk9MTE9XIiAqLwpAQCAtMTQ5OCw4ICsxNTAz LDE1IEBACiAJCSAqIFRoZSB6aXB3b3JrX2VudHJ5IHdpbGwgaW5jbHVkZSBhIHBvaW50ZXIg dG8gdGhpcwogCQkgKiBjb25mX2VudHJ5LCBzbyB0aGUgY29uZl9lbnRyeSBzaG91bGQgbm90 IGJlIGZyZWVkLgogCQkgKi8KLQkJZnJlZV9vcl9rZWVwID0gS0VFUF9FTlQ7Ci0JCXNhdmVf emlwd29yayhlbnQsIHN3b3JrLCBlbnQtPmZzaXplLCBmaWxlMSk7CisJCWlmIChmbGFncyAm IChDRV9OT0NPTVBBQ1QxKSkgeworCQkJaWYgKCFsc3RhdChmaWxlMiwgJnN0KSkgeworCQkJ CWZyZWVfb3Jfa2VlcCA9IEtFRVBfRU5UOworCQkJCXNhdmVfemlwd29yayhlbnQsIHN3b3Jr LCBlbnQtPmZzaXplLCBmaWxlMik7CisJCQl9CisJCX0gZWxzZSB7CisJCQlmcmVlX29yX2tl ZXAgPSBLRUVQX0VOVDsKKwkJCXNhdmVfemlwd29yayhlbnQsIHN3b3JrLCBlbnQtPmZzaXpl LCBmaWxlMSk7CisJCX0KIAl9CiAKIAlyZXR1cm4gKGZyZWVfb3Jfa2VlcCk7Cg== --------------030103040208010004050309--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46BC49DB.8060509>