Re: [PATCH rdma-core 16/21] srp_daemon: Do not use LOG_PERROR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2017-07-24 at 14:00 -0600, Jason Gunthorpe wrote:
> When running from systemd syslog will send messages to the log, but
> so will stderr. Thus using LOG_PERROR doubles every log message.
> 
> Signed-off-by: Jason Gunthorpe <jgunthorpe@xxxxxxxxxxxxxxxxxxxx>
> ---
>  srp_daemon/srp_daemon.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/srp_daemon/srp_daemon.c b/srp_daemon/srp_daemon.c
> index c0e8d23d58faf5..f0dfe260945574 100644
> --- a/srp_daemon/srp_daemon.c
> +++ b/srp_daemon/srp_daemon.c
> @@ -2090,7 +2090,7 @@ int main(int argc, char *argv[])
>  		goto restore_sig;
>  	}
>  
> -	openlog("srp_daemon", LOG_PID | LOG_PERROR, LOG_DAEMON);
> +	openlog("srp_daemon", LOG_PID, LOG_DAEMON);
>  
>  	config = calloc(1, sizeof(*config));
>  	if (!config) {

Hello Jason,

LOG_PERROR is very convenient when debugging srp_daemon. How about using
the result of isatty(STDERR_FILENO) to decide whether or not to enable
LOG_PERROR?

All the other srp_daemon-related patches in this series look fine to me.
Thank you for having done this work!

Bart.--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux