syslogd - logging locally and remotely based on log-level

2015-01-06 Thread Ercolino de spiacico
Hello! I have a quick question about syslogd.
Is there any way to run two instances of syslogd covering range of log levels 
(not
overlapping)? I'm specifically asking about option "-l"


BusyBox v1.21.1 (2014-11-19 20:10:45 CET) multi-call binary.

Usage: syslogd [OPTIONS]

System logging utility
(this version of syslogd ignores /etc/syslog.conf)

-n  Run in foreground
-O FILE Log to FILE (default:/var/log/messages)
-l NLog only messages more urgent than prio N (1-8)
-S  Smaller output
-s SIZE Max size (KB) before rotation (default:200KB, 0=off)
-b NN rotated logs to keep (default:1, max=99, 0=purge)
-R HOST[:PORT]  Log to IP or hostname on PORT (default PORT=514/UDP)
-L  Log locally and via network (default is network only if 
-R)


What I would like to achieve is: having a syslogd instance1 that logs locally 
let's say
1-4 and syslogd instance2 that logs 5-8 remotely. Thus a message e.g. level 6 
is not
logged under instance1 but instance2 only.

This can be very helpful for debugging.

Is this possible with the current busybox build? If not can it be considered an
improvement for the next release?

Many thanks!
___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


1.23.0 FreeBSD build fails: 1 showstopper mempcpy(), 1 sendfile() incompat.

2015-01-06 Thread Matthias Andree
Happy new year!

I just tried to upgrade the busybox-unstable port on FreeBSD to 1.23.0,
but one issue of the two given below is a showstopper.


The first one pertains to an incompatibility around sendfile. Easily
sidestepped by deconfiguring it.

> libbb/copyfd.c:12:27: error: sys/sendfile.h: No such file or directory
> libbb/copyfd.c: In function 'bb_full_fd_action':
> libbb/copyfd.c:65: warning: passing argument 3 of 'sendfile' makes integer 
> from pointer without a cast
> libbb/copyfd.c:65: error: too few arguments to function 'sendfile'

FreeBSD's sendfile() is documented here:



The showstopper pertains to using a GNUism, namely mempcpy():

> libbb/lib.a(replace.o): In function `xmalloc_substitute_string':
> replace.c:(.text.xmalloc_substitute_string+0x6c): undefined reference to 
> `mempcpy'
> replace.c:(.text.xmalloc_substitute_string+0x7c): undefined reference to 
> `mempcpy'

This needs to be replaced by memcpy + pointer arithmetics, or a
replacement mempcpy() function on systems that don't bring their own.

Best regards,
Matthias



signature.asc
Description: OpenPGP digital signature
___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox