summaryrefslogtreecommitdiff
path: root/auto_tests
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2018-06-04 12:34:16 +0000
committeriphydf <iphydf@users.noreply.github.com>2018-06-04 12:39:28 +0000
commit8a4a5c2aa21308ca9ce34cfbe38f663c9ace8c13 (patch)
treeeb3555ffe670cda06cdf22b81a932ce6b349c527 /auto_tests
parent1af1b61e9dad3224f3bcca779445d486be6b9a8b (diff)
Log only the filename, not the full path in LOGGER.
Fixes #900.
Diffstat (limited to 'auto_tests')
-rw-r--r--auto_tests/helpers.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/auto_tests/helpers.h b/auto_tests/helpers.h
index bebde35b..b953e29a 100644
--- a/auto_tests/helpers.h
+++ b/auto_tests/helpers.h
@@ -43,7 +43,7 @@ static const char *tox_log_level_name(TOX_LOG_LEVEL level)
43 return "<unknown>"; 43 return "<unknown>";
44} 44}
45 45
46static void print_debug_log(Tox *m, TOX_LOG_LEVEL level, const char *path, uint32_t line, const char *func, 46static void print_debug_log(Tox *m, TOX_LOG_LEVEL level, const char *file, uint32_t line, const char *func,
47 const char *message, void *user_data) 47 const char *message, void *user_data)
48{ 48{
49 if (level == TOX_LOG_LEVEL_TRACE) { 49 if (level == TOX_LOG_LEVEL_TRACE) {
@@ -51,8 +51,6 @@ static void print_debug_log(Tox *m, TOX_LOG_LEVEL level, const char *path, uint3
51 } 51 }
52 52
53 uint32_t index = user_data ? *(uint32_t *)user_data : 0; 53 uint32_t index = user_data ? *(uint32_t *)user_data : 0;
54 const char *file = strrchr(path, '/');
55 file = file ? file + 1 : path;
56 fprintf(stderr, "[#%d] %s %s:%d\t%s:\t%s\n", index, tox_log_level_name(level), file, line, func, message); 54 fprintf(stderr, "[#%d] %s %s:%d\t%s:\t%s\n", index, tox_log_level_name(level), file, line, func, message);
57} 55}
58 56