DAPL_DBG_TYPE g_dapl_dbg_type; /* initialized in dapl_init.c */
DAPL_DBG_DEST g_dapl_dbg_dest; /* initialized in dapl_init.c */
+static char *_ptr_host_ = NULL;
+static char _hostname_[128];
+
void dapl_internal_dbg_log ( DAPL_DBG_TYPE type, const char *fmt, ...)
{
va_list args;
+ if ( _ptr_host_ == NULL )
+ {
+ gethostname(_hostname_, sizeof(_hostname_));
+ _ptr_host_ = _hostname_;
+ }
+
if ( type & g_dapl_dbg_type )
{
if ( DAPL_DBG_DEST_STDOUT & g_dapl_dbg_dest )
{
va_start (args, fmt);
+ fprintf(stdout, "%s:%d: ", _ptr_host_, getpid());
dapl_os_vprintf (fmt, args);
va_end (args);
}