[PATCH] debug: Print header when logging to stdout
martin at meltin.net
Fri Nov 21 16:19:11 MST 2014
On Fri, 21 Nov 2014 14:52:16 -0700, Christof Schmitt <cs at samba.org>
> This patch changes the debug code, so that the header is always printed.
> I find this useful for debugging interactive commands with -d10. Always
> having the debug header in the output would also make the explicit
> function name in the debug message obsolete.
> I assume that there is a historical reason for the behavior in the debug
> code; does anybody know why the debug code behaves differently for
> stdout and logging to a file?
Things like systemd can intercept stdout and log them. So if you just
send debug messages to stdout after systemd starts Samba, then systemd
will put stdout into the journal thing and optionally pass it on to
rsyslog. I think I've tested this.
I think someone should experiment with systemd logging. If logging
header-less to stdout is the most efficient way of pushing out lots of
debug info then we probably don't want to lose that...
peace & happiness,
More information about the samba-technical