src/lib/message.c
void
vd_msg(const char *file, int line, int64_t level, const char *fmt, va_list arg_ptr)
{
    char      buf[5000];
    int       len = 0; /* space used in buf */
    bool      details = true;
    utime_t   mtime;

    if (level < 0) {
       details = false;
       level = -level;
    }

    if (chk_dbglvl(level)) {
       if (dbg_timestamp) {
          mtime = time(NULL);
          bstrftimes(buf+len, sizeof(buf)-len, mtime);
          len = strlen(buf);
          buf[len++] = ' ';
       }

#ifdef FULL_LOCATION
       if (details) {
          if (dbg_thread) {
             len += bsnprintf(buf+len, sizeof(buf)-len, "%s[%lld]: %s:%d-%u ",
                             my_name, bthread_get_thread_id(),
                             get_basename(file), line, get_jobid_from_tsd());
          } else {
             len += bsnprintf(buf+len, sizeof(buf)-len, "%s: %s:%d-%u ",
                   my_name, get_basename(file), line, get_jobid_from_tsd());
          }
       }
#endif
       bvsnprintf(buf+len, sizeof(buf)-len, (char *)fmt, arg_ptr);

       pt_out(buf);
    }
}
/*********************************************************************
 *
 *  This subroutine prints a debug message if the level number
 *  is less than or equal the debug_level. File and line numbers
 *  are included for more detail if desired, but not currently
 *  printed.
 *
 *  If the level is negative, the details of file and line number
 *  are not printed.
 *
 */
This subroutine prints a debug message if the level number
is less than or equal the debug_level. File and line numbers
are included for more detail if desired, but not currently
printed.

If the level is negative, the details of file and line number
are not printed.
This subroutine prints a debug message if the level number is less than or equal the debug_level . File and line numbers are included for more detail if desired but not currently printed . If the level is negative the details of file and line number are not printed .
void
vd_msg(const char *file, int line, int64_t level, const char *fmt, va_list arg_ptr)
{
    char      buf[5000];
    int       len = 0; 
    bool      details = true;
    utime_t   mtime;
    if (level < 0) {
       details = false;
       level = -level;
    }
    if (chk_dbglvl(level)) {
       if (dbg_timestamp) {
          mtime = time(NULL);
          bstrftimes(buf+len, sizeof(buf)-len, mtime);
          len = strlen(buf);
          buf[len++] = ' ';
       }
#ifdef FULL_LOCATION
       if (details) {
          if (dbg_thread) {
             len += bsnprintf(buf+len, sizeof(buf)-len, "%s[%lld]: %s:%d-%u ",
                             my_name, bthread_get_thread_id(),
                             get_basename(file), line, get_jobid_from_tsd());
          } else {
             len += bsnprintf(buf+len, sizeof(buf)-len, "%s: %s:%d-%u ",
                   my_name, get_basename(file), line, get_jobid_from_tsd());
          }
       }
#endif
       bvsnprintf(buf+len, sizeof(buf)-len, (char *)fmt, arg_ptr);
       pt_out(buf);
    }
}
void vd_msg ( const char * file , int line , int64_t level , const char * fmt , va_list arg_ptr ) { char buf [ 5000 ] ; int len = 0 ; bool details = true ; utime_t mtime ; if ( level < 0 ) { details = false ; level = - level ; } if ( chk_dbglvl ( level ) ) { if ( dbg_timestamp ) { mtime = time ( NULL ) ; bstrftimes ( buf + len , sizeof ( buf ) - len , mtime ) ; len = strlen ( buf ) ; buf [ len ++ ] = ' ' ; } #ifdef FULL_LOCATION if ( details ) { if ( dbg_thread ) { len += bsnprintf ( buf + len , sizeof ( buf ) - len , " " , my_name , bthread_get_thread_id ( ) , get_basename ( file ) , line , get_jobid_from_tsd ( ) ) ; } else { len += bsnprintf ( buf + len , sizeof ( buf ) - len , " " , my_name , get_basename ( file ) , line , get_jobid_from_tsd ( ) ) ; } } #endif bvsnprintf ( buf + len , sizeof ( buf ) - len , ( char * ) fmt , arg_ptr ) ; pt_out ( buf ) ; } }
This subroutine prints a debug message if the level number
  is less than or equal the debug_level.
This subroutine prints a debug message if the level number is less than or equal the debug_level .
/* space used in buf */