[vlc-devel] [PATCH] src: Win32: add message categories to debug logs
Edward Wang
edward.c.wang at compdigitec.com
Sun Feb 3 03:34:59 CET 2013
---
src/misc/messages.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/misc/messages.c b/src/misc/messages.c
index 1d8fd0b..36ffbc6 100644
--- a/src/misc/messages.c
+++ b/src/misc/messages.c
@@ -325,9 +325,15 @@ static void Win32DebugOutputMsg (void* d, int type, const msg_item_t *p_item,
msg[msg_len] = '\n';
msg[msg_len + 1] = '\0';
}
- wchar_t *wmsg = ToWide(msg);
- OutputDebugStringW(wmsg);
- free(wmsg);
+ char* psz_msg = NULL;
+ int res = asprintf(&psz_msg, "%s %s%s: %s", p_item->psz_module,
+ p_item->psz_object_type, msg_type[type], msg);
+ if(res > 0) {
+ wchar_t* wmsg = ToWide(psz_msg);
+ OutputDebugStringW(wmsg);
+ free(wmsg);
+ free(psz_msg);
+ }
}
free(msg);
}
--
1.7.5.4
More information about the vlc-devel
mailing list