[vlc-commits] src: Win32: add message categories to debug logs
Edward Wang
git at videolan.org
Sun Feb 3 16:25:31 CET 2013
vlc | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Sun Feb 3 09:12:04 2013 -0500| [e1aa97a9e8bdd3787fb3543b13cf6a6f624fd350] | committer: Rafaël Carré
src: Win32: add message categories to debug logs
Signed-off-by: Rafaël Carré <funman at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e1aa97a9e8bdd3787fb3543b13cf6a6f624fd350
---
src/misc/messages.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/misc/messages.c b/src/misc/messages.c
index 1d8fd0b..d754b7c 100644
--- a/src/misc/messages.c
+++ b/src/misc/messages.c
@@ -325,9 +325,14 @@ 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;
+ if(asprintf(&psz_msg, "%s %s%s: %s", p_item->psz_module,
+ p_item->psz_object_type, msg_type[type], msg) > 0) {
+ wchar_t* wmsg = ToWide(psz_msg);
+ OutputDebugStringW(wmsg);
+ free(wmsg);
+ free(psz_msg);
+ }
}
free(msg);
}
More information about the vlc-commits
mailing list