From 98950846b70129bb195768994fc91425065104a1 Mon Sep 17 00:00:00 2001 From: TimePath Date: Sun, 13 Mar 2016 20:32:12 +1100 Subject: [PATCH] Log: add progname prefix --- qcsrc/lib/log.qh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qcsrc/lib/log.qh b/qcsrc/lib/log.qh index 01dc645f5..68c974dc3 100644 --- a/qcsrc/lib/log.qh +++ b/qcsrc/lib/log.qh @@ -1,5 +1,7 @@ #pragma once +#include "progname.qh" + #define assert(expr, ...) _assert(LOG_SEVERE, expr, __VA_ARGS__) #define devassert(...) MACRO_BEGIN if (autocvar_developer) assert(__VA_ARGS__); MACRO_END @@ -38,7 +40,7 @@ string(string...) strcat0n = #115; #define _LOG(f, level, s) \ MACRO_BEGIN { \ - f(sprintf("^9[::" level "^9] [" __FILE__ "^7:^9%s^7:^9" STR(__LINE__) "] \n^7%s\n", __FUNC__, s)); \ + f(sprintf("^9[::^7" PROGNAME "^9::" level "^9] [" __FILE__ "^7:^9%s^7:^9" STR(__LINE__) "] \n^7%s\n", __FUNC__, s)); \ } MACRO_END #define LOG_FATAL(...) _LOG_FATAL(strcat0n(__VA_ARGS__)) -- 2.39.2