LONG WLog_GetFilterLogLevel(wLog* log)
{
DWORD i, j;
- LONG iLevel = -1;
BOOL match = FALSE;
+ if (log->FilterLevel >= 0)
+ return log->FilterLevel;
+
for (i = 0; i < g_FilterCount; i++)
{
for (j = 0; j < g_Filters[i].NameCount; j++)
}
if (match)
- iLevel = (int) g_Filters[i].Level;
+ log->FilterLevel = g_Filters[i].Level;
+ else
+ log->FilterLevel = log->Level;
- return iLevel;
+ return log->FilterLevel;
}
BOOL WLog_ParseName(wLog* log, LPCSTR name)
log->Parent = rootLogger;
log->ChildrenCount = 0;
log->ChildrenSize = 16;
+ log->FilterLevel = -1;
if (!(log->Children = (wLog**) calloc(log->ChildrenSize, sizeof(wLog*))))
goto out_fail;