libtirpc: New configurable debugging routines

This patch added new configurable debugging interface that
will allow existing debugging statements to be enabled
and disabled by the calling application.

    libtirpc_set_debug(char *name, int level, int use_stderr)

       * This called by the application to set the debugging level.
         If use_stderr is set, all message will go to stderr,
         otherwise syslog() will be used.

    LIBTIRPC_DEBUG(level, msg)
        * This is the macro called by functions within the library.

    libtirpc_log_dbg(char *fmt, ...)
        * This is the routine the LIBTIRPC_DEBUG macro uses to
          log the messages and can be called directly by internal
          routines

    vlibtirpc_log_dbg(int level, const char *fmt, va_list args)
        * This routine is used by existing debugging routines
          that have already obtained their arguments using
          stdarg(3) macros.

Signed-off-by: Steve Dickson <steved@redhat.com>
gss_log: Convert existing gss debugging routines

Convert the gss_log_XXX routines to used the
new LIBTIRPC_DEBUG() macros.

Signed-off-by: Steve Dickson <steved@redhat.com>
gss_log: Removed DEBUG defines

Enable the gss_log_XXX routines by remove the
ifdef DEBUGs that surround them.

Signed-off-by: Steve Dickson <steved@redhat.com>
gss_log_status: reformat output to use one line.

With the new LIBTIRPC_DEBUG() macros a new-line
is appended on each output buffer. So concatenate
gss_log_status()'s output into one buffer.

Signed-off-by: Steve Dickson <steved@redhat.com>
git_log_status: Add function name to status message

Added the function name to the status message to
identify where the status is coming from.

Signed-off-by: Steve Dickson <steved@redhat.com>
libtirpc_debug: Converted the rest of the #ifdef DEBUGs

Replace the rest of the fprintf(stderr) surrounded
by ifdef DEBUGS with the LIBTIRPC_DEBUG macro

Signed-off-by: Steve Dickson <steved@redhat.com>
gss_log: Replace gss_log_debug with LIBTIRPC_DEBUG macros

A couple gss_log_debug() calls are reporting errors.
To allow errors to be logged with the least amount
of debugging on, replace those calls the LIBTIRPC_DEBUG
macro

Signed-off-by: Steve Dickson <steved@redhat.com>
print_rpc_gss_sec: Make sure logging to stderr is enabled.

It does not make sense to try an covert this routine to
used the new debugging macro. So just insure the correct
debugging level and printing to stderr is enabled.

Signed-off-by: Steve Dickson <steved@redhat.com>
Clean up: Remove newlines from a couple debugging calls.

Signed-off-by: Steve Dickson <steved@redhat.com>
svcauth_des: Convert local debug() calls to LIBTIRPC_DEBUG() calls

Signed-off-by: Steve Dickson <steved@redhat.com>
key_call: Convert local debug() calls to LIBTIRPC_DEBUG() calls

Signed-off-by: Steve Dickson <steved@redhat.com>
clnt_bcast: Convert local debug() calls to LIBTIRPC_DEBUG() calls

Signed-off-by: Steve Dickson <steved@redhat.com>
rpcb_clnt: Convert fprintf calls to LIBTIRPC_DEBUG() calls

Signed-off-by: Steve Dickson <steved@redhat.com>
svc_dg: Convert fprintf calls to LIBTIRPC_DEBUG() calls

Signed-off-by: Steve Dickson <steved@redhat.com>
auth_des: Converted some of the debugging syslog calls to LIBTIRPC_DEBUG() calls

Signed-off-by: Steve Dickson <steved@redhat.com>