libwinpr-smartcard: add logging for each calls in smartcard inspector

This commit is contained in:
Marc-André Moreau
2014-05-26 17:54:39 -04:00
parent b6a8767b71
commit ba5d84ee5c
3 changed files with 430 additions and 5 deletions

View File

@@ -509,7 +509,7 @@ int DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints)
smartcard->log = WLog_Get("com.freerdp.channel.smartcard.client");
WLog_SetLogLevel(smartcard->log, WLOG_DEBUG);
//WLog_SetLogLevel(smartcard->log, WLOG_DEBUG);
smartcard->IrpQueue = MessageQueue_New(NULL);
smartcard->rgSCardContextList = ListDictionary_New(TRUE);

File diff suppressed because it is too large Load Diff

View File

@@ -237,21 +237,23 @@ wLogLayout* WLog_GetLogLayout(wLog* log)
void WLog_Layout_SetPrefixFormat(wLog* log, wLogLayout* layout, const char* format)
{
if (layout->FormatString)
{
free(layout->FormatString);
layout->FormatString = NULL;
}
layout->FormatString = _strdup(format);
if (format)
layout->FormatString = _strdup(format);
}
wLogLayout* WLog_Layout_New(wLog* log)
{
wLogLayout* layout;
layout = (wLogLayout*) malloc(sizeof(wLogLayout));
layout = (wLogLayout*) calloc(1, sizeof(wLogLayout));
if (layout)
{
ZeroMemory(layout, sizeof(wLogLayout));
layout->FormatString = _strdup("[%lv][%mn] - ");
}
@@ -263,7 +265,10 @@ void WLog_Layout_Free(wLog* log, wLogLayout* layout)
if (layout)
{
if (layout->FormatString)
{
free(layout->FormatString);
layout->FormatString = NULL;
}
free(layout);
}