[BusyBox-cvs] busybox/include usage.h,1.168,1.169

Erik Andersen andersen at busybox.net
Thu Oct 9 09:43:20 UTC 2003


Update of /var/cvs/busybox/include
In directory winder:/tmp/cvs-serv9416/include

Modified Files:
	usage.h 
Log Message:
Arnd Ben Otto writes:

Hi Eric

I have written a small patch for the Busybox syslogd. With this patch
one can limit the size of the messagfile. As soon as the limit is
reached the syslogd can rotate or purge the messagefile(s) on his own.
There is no necessity to use an external rotatescript.

Even if logread does something similar, its very handy to have some
messagefile after your box crash.

I wrote this patch initial vor BB 0.6x where no cron daemon was avail.
Now I adapted it for the new Version and i hope it is still useful. At
least I still use it :-)

bye
Arnd



Index: usage.h
===================================================================
RCS file: /var/cvs/busybox/include/usage.h,v
retrieving revision 1.168
retrieving revision 1.169
diff -u -d -r1.168 -r1.169
--- usage.h	24 Sep 2003 03:22:55 -0000	1.168
+++ usage.h	9 Oct 2003 09:43:17 -0000	1.169
@@ -2214,6 +2214,11 @@
 	"Write all buffered filesystem blocks to disk."
 
 
+#ifdef CONFIG_FEATURE_ROTATE_LOGFILE
+	#define USAGE_ROTATE_LOGFILE(a) a
+#else
+	#define USAGE_ROTATE_LOGFILE(a) 
+#endif
 #ifdef CONFIG_FEATURE_REMOTE_LOG
   #define USAGE_REMOTE_LOG(a) a
 #else
@@ -2234,6 +2239,9 @@
 	"\t-m NUM\t\tInterval between MARK lines (default=20min, 0=off)\n" \
 	"\t-n\t\tRun as a foreground process\n" \
 	"\t-O FILE\t\tUse an alternate log file (default=/var/log/messages)" \
+	USAGE_ROTATE_LOGFILE( \
+	"\n\t-s SIZE\t\tMax size (KB) bevor rotate (default=200KB, 0=off)\n" \
+	"\t-b NUM\t\tNumber of rotated log files (default=1, 0=purge log)") \
 	USAGE_REMOTE_LOG( \
 	"\n\t-R HOST[:PORT]\tLog to IP or hostname on PORT (default PORT=514/UDP)\n" \
 	"\t-L\t\tLog locally and via network logging (default is network only)") \




More information about the busybox-cvs mailing list