martin      98/05/04 09:28:47

  Modified:    src      CHANGES
               src/main http_log.c
  Log:
  BS2000 Debug Logging logs relative paths now, as in unix
  
  Revision  Changes    Path
  1.816     +4 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.815
  retrieving revision 1.816
  diff -u -u -r1.815 -r1.816
  --- CHANGES   1998/05/04 06:58:02     1.815
  +++ CHANGES   1998/05/04 16:28:45     1.816
  @@ -1,5 +1,9 @@
   Changes with Apache 1.3b7
   
  +  *) Fix debug log messages for BS2000/OSD: instead of logging the whole
  +     absolute path, only log base name of logging source as is done
  +     in unix. [Martin Kraemer]
  +
     *) Ronald Tschalaer's Accept-Encoding patch - preserve the "x-" in
        the encoding type from the Accept-Encoding header (if it's there)
        and use it in the response, as that's probably what it'll be expecting.
  
  
  
  1.56      +18 -0     apache-1.3/src/main/http_log.c
  
  Index: http_log.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/http_log.c,v
  retrieving revision 1.55
  retrieving revision 1.56
  diff -u -u -r1.55 -r1.56
  --- http_log.c        1998/05/03 17:16:59     1.55
  +++ http_log.c        1998/05/04 16:28:47     1.56
  @@ -325,6 +325,24 @@
            "[%s] ", priorities[level & APLOG_LEVELMASK].t_name);
   
       if (file && (level & APLOG_LEVELMASK) == APLOG_DEBUG) {
  +#ifdef _OSD_POSIX
  +     char tmp[256];
  +     char *e = strrchr(file, '/');
  +
  +     /* In OSD/POSIX, the compiler returns for __FILE__
  +      * a string like: __FILE__="*POSIX(/usr/include/stdio.h)"
  +      * (it even returns an absolute path for sources in
  +      * the current directory). Here we try to strip this
  +      * down to the basename.
  +      */
  +     if (e != NULL && e[1] != '\0') {
  +         ap_snprintf(tmp, sizeof(tmp), "%s", &e[1]);
  +         e = &tmp[strlen(tmp)-1];
  +         if (*e == ')')
  +             *e = '\0';
  +         file = tmp;
  +     }
  +#endif /*_OSD_POSIX*/
        len += ap_snprintf(errstr + len, sizeof(errstr) - len,
                "%s(%d): ", file, line);
       }
  
  
  

Reply via email to