File 01-monthly-logging.patch of Package udplogger

For normal purposes, monthly logfiles are enough.

--- udplogger-1.1/udplogger.c.orig	2014-04-19 17:00:58.000000000 +0200
+++ udplogger-1.1/udplogger.c	2014-11-17 15:01:35.802762502 +0100
@@ -88,8 +88,8 @@ static void switch_logfile(struct tm *tm
 	FILE *fp;
 	int fd;
 	struct stat buf;
-	snprintf(filename, sizeof(filename) - 1, "%04u-%02u-%02u.log",
-		 tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday);
+	snprintf(filename, sizeof(filename) - 1, "%04u-%02u.log",
+		 tm->tm_year + 1900, tm->tm_mon + 1);
 	/*
 	 * The log file must be a regular file without any executable bits.
 	 *
@@ -151,8 +154,7 @@ static void write_logfile(struct client
 		 * (last_time / 86400 != now_time / 86400) in order to allow
 		 * switching at 00:00:00 of the local time.
 		 */
-		if (tm->tm_mday != last_tm.tm_mday ||
-		    tm->tm_mon != last_tm.tm_mon ||
+		if (tm->tm_mon != last_tm.tm_mon ||
 		    tm->tm_year != last_tm.tm_year) {
 			last_tm = *tm;
 			switch_logfile(tm);
openSUSE Build Service is sponsored by