diff options
author | Chris Robinson <[email protected]> | 2011-09-02 02:00:37 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-09-02 02:00:37 -0700 |
commit | 3a2fa18744127618c5a6715ff1e24f18c9f9dd49 (patch) | |
tree | c0fbd8448f57cce5b466d264619f902daff4c331 /Alc/helpers.c | |
parent | 370c9f553df9af129f1504270dbd36cd5066f250 (diff) |
Log the function name instead of the source file and line number
Diffstat (limited to 'Alc/helpers.c')
-rw-r--r-- | Alc/helpers.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/Alc/helpers.c b/Alc/helpers.c index fab8209a..cd51912c 100644 --- a/Alc/helpers.c +++ b/Alc/helpers.c @@ -207,18 +207,12 @@ void *GetSymbol(void *handle, const char *name) #endif -void al_print(const char *fname, unsigned int line, const char *fmt, ...) +void al_print(const char *func, const char *fmt, ...) { - const char *fn; char str[256]; int i; - fn = strrchr(fname, '/'); - if(!fn) fn = strrchr(fname, '\\'); - if(!fn) fn = fname; - else fn += 1; - - i = snprintf(str, sizeof(str), "AL lib: %s:%d: ", fn, line); + i = snprintf(str, sizeof(str), "AL lib: %s: ", func); if(i < (int)sizeof(str) && i > 0) { va_list ap; |