src/lib/message.c
void
t_msg(const char *file, int line, int64_t level, const char *fmt,...)
{
    char      buf[5000];
    int       len;
    va_list   arg_ptr;
    int       details = TRUE;

    level = level & ~DT_ALL;    /* level should be tag free */

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

    if (level <= debug_level) {
       if (!trace_fd) {
          bsnprintf(buf, sizeof(buf), "%s/%s.trace", working_directory ? working_directory : ".", my_name);
          trace_fd = bfopen(buf, "a+b");
       }

#ifdef FULL_LOCATION
       if (details) {
          len = bsnprintf(buf, sizeof(buf), "%s: %s:%d ", my_name, get_basename(file), line);
       } else {
          len = 0;
       }
#else
       len = 0;
#endif
       va_start(arg_ptr, fmt);
       bvsnprintf(buf+len, sizeof(buf)-len, (char *)fmt, arg_ptr);
       va_end(arg_ptr);
       if (trace_fd != NULL) {
           fputs(buf, trace_fd);
           fflush(trace_fd);
       }
   }
}
/*********************************************************************
 *
 *  subroutine writes a debug message to the trace file 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.
 */
subroutine writes a debug message to the trace file 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.
subroutine writes a debug message to the trace file 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
t_msg(const char *file, int line, int64_t level, const char *fmt,...)
{
    char      buf[5000];
    int       len;
    va_list   arg_ptr;
    int       details = TRUE;
    level = level & ~DT_ALL;    
    if (level < 0) {
       details = FALSE;
       level = -level;
    }
    if (level <= debug_level) {
       if (!trace_fd) {
          bsnprintf(buf, sizeof(buf), "%s/%s.trace", working_directory ? working_directory : ".", my_name);
          trace_fd = bfopen(buf, "a+b");
       }
#ifdef FULL_LOCATION
       if (details) {
          len = bsnprintf(buf, sizeof(buf), "%s: %s:%d ", my_name, get_basename(file), line);
       } else {
          len = 0;
       }
#else
       len = 0;
#endif
       va_start(arg_ptr, fmt);
       bvsnprintf(buf+len, sizeof(buf)-len, (char *)fmt, arg_ptr);
       va_end(arg_ptr);
       if (trace_fd != NULL) {
           fputs(buf, trace_fd);
           fflush(trace_fd);
       }
   }
}
void t_msg ( const char * file , int line , int64_t level , const char * fmt , ... ) { char buf [ 5000 ] ; int len ; va_list arg_ptr ; int details = TRUE ; level = level & ~ DT_ALL ; if ( level < 0 ) { details = FALSE ; level = - level ; } if ( level <= debug_level ) { if ( ! trace_fd ) { bsnprintf ( buf , sizeof ( buf ) , " " , working_directory ? working_directory : " " , my_name ) ; trace_fd = bfopen ( buf , " " ) ; } #ifdef FULL_LOCATION if ( details ) { len = bsnprintf ( buf , sizeof ( buf ) , " " , my_name , get_basename ( file ) , line ) ; } else { len = 0 ; } #else len = 0 ; #endif va_start ( arg_ptr , fmt ) ; bvsnprintf ( buf + len , sizeof ( buf ) - len , ( char * ) fmt , arg_ptr ) ; va_end ( arg_ptr ) ; if ( trace_fd != NULL ) { fputs ( buf , trace_fd ) ; fflush ( trace_fd ) ; } } }
subroutine writes a debug message to the trace file if the level number
  is less than or equal the debug_level.
subroutine writes a debug message to the trace file if the level number is less than or equal the debug_level .
/* level should be tag free */