Changeset 7cd9b79 in git


Ignore:
Timestamp:
2012-11-13T12:30:21Z (8 years ago)
Author:
Xuefer <xuefer@…>
Branches:
3.0, 3.1, 3.2, master, trunk
Children:
667412f
Parents:
8b83b80
Message:

show basename for easier trace log reader

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1174 c26eb9a1-5813-0410-bd6c-c2e55f420ca7

Location:
util
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • util/xc_trace.c

    r0af13b3 r7cd9b79  
     1#include "php.h"
    12#include "xc_trace.h"
    23#include <stdio.h>
    34#include <stdarg.h>
     5#include <string.h>
    46
     7const char *xc_trace_get_basename(const char *path) /* {{{ */
     8{
     9    const char *last_separator = strrchr(path, PHP_DIR_SEPARATOR);
     10    return last_separator ? last_separator + 1 : path;
     11}
     12/* }}} */
    513int xc_vtrace(const char *fmt, va_list args) /* {{{ */
    614{
  • util/xc_trace.h

    r12e8dc0 r7cd9b79  
    3333}
    3434#   else
     35const char *xc_trace_get_basename(const char *path);
    3536#       define TRACE(fmt, ...) \
    36         xc_trace("%s:%d: " fmt "\r\n", __FILE__, __LINE__, __VA_ARGS__)
     37        xc_trace("%s:%d: " fmt "\r\n", xc_trace_get_basename(__FILE__), __LINE__, __VA_ARGS__)
    3738#   endif /* ZEND_WIN32 */
    3839#   undef NDEBUG
Note: See TracChangeset for help on using the changeset viewer.