| OLD | NEW |
| 1 #include "PluginStdAfx.h" | 1 #include "PluginStdAfx.h" |
| 2 | 2 |
| 3 #include "PluginDebug.h" | 3 #include "PluginDebug.h" |
| 4 #include "PluginMutex.h" | 4 #include "PluginMutex.h" |
| 5 #include "PluginSettings.h" | 5 #include "PluginSettings.h" |
| 6 | 6 |
| 7 | 7 |
| 8 class CPluginDebugLock : public CPluginMutex | 8 class CPluginDebugLock : public CPluginMutex |
| 9 { | 9 { |
| 10 | 10 |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 } | 176 } |
| 177 | 177 |
| 178 void CPluginDebug::DebugResultDomain(const CString& domain) | 178 void CPluginDebug::DebugResultDomain(const CString& domain) |
| 179 { | 179 { |
| 180 DebugResult(L"================================================================
================================================================================
==========================================="); | 180 DebugResult(L"================================================================
================================================================================
==========================================="); |
| 181 DebugResult(domain); | 181 DebugResult(domain); |
| 182 DebugResult(L"================================================================
================================================================================
==========================================="); | 182 DebugResult(L"================================================================
================================================================================
==========================================="); |
| 183 } | 183 } |
| 184 | 184 |
| 185 | 185 |
| 186 void CPluginDebug::DebugResultBlocking(const CString& type, const CString& src,
const CString& domain) | 186 void CPluginDebug::DebugResultBlocking(const CString& type, const CString& src,
const std::wstring& domain) |
| 187 { | 187 { |
| 188 CString srcTrunc = src; | 188 CString srcTrunc = src; |
| 189 if (srcTrunc.GetLength() > 100) | 189 if (srcTrunc.GetLength() > 100) |
| 190 { | 190 { |
| 191 srcTrunc = src.Left(67) + L"..." + src.Right(30); | 191 srcTrunc = src.Left(67) + L"..." + src.Right(30); |
| 192 } | 192 } |
| 193 | 193 |
| 194 CString blocking; | 194 CString blocking; |
| 195 blocking.Format(L"Blocked %-12s %-20s %s", type, domain.IsEmpty()? L"-" : d
omain, srcTrunc); | 195 blocking.Format(L"Blocked %-12s %-20s %s", type, domain.empty()? L"-" : to_
CString(domain), srcTrunc); |
| 196 | 196 |
| 197 DebugResult(blocking); | 197 DebugResult(blocking); |
| 198 } | 198 } |
| 199 | 199 |
| 200 | 200 |
| 201 void CPluginDebug::DebugResultHiding(const CString& tag, const CString& src, con
st CString& filter) | 201 void CPluginDebug::DebugResultHiding(const CString& tag, const CString& src, con
st CString& filter) |
| 202 { | 202 { |
| 203 CString srcTrunc = src; | 203 CString srcTrunc = src; |
| 204 if (srcTrunc.GetLength() > 100) | 204 if (srcTrunc.GetLength() > 100) |
| 205 { | 205 { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 220 { | 220 { |
| 221 DeleteFileW(GetDataPath(L"debug_result.txt").c_str()); | 221 DeleteFileW(GetDataPath(L"debug_result.txt").c_str()); |
| 222 } | 222 } |
| 223 } | 223 } |
| 224 | 224 |
| 225 #endif // ENABLE_DEBUG_RESULT | 225 #endif // ENABLE_DEBUG_RESULT |
| 226 | 226 |
| 227 | 227 |
| 228 #ifdef ENABLE_DEBUG_RESULT_IGNORED | 228 #ifdef ENABLE_DEBUG_RESULT_IGNORED |
| 229 | 229 |
| 230 void CPluginDebug::DebugResultIgnoring(const CString& type, const CString& src,
const CString& domain) | 230 void CPluginDebug::DebugResultIgnoring(const CString& type, const CString& src,
const std::wstring& domain) |
| 231 { | 231 { |
| 232 CString srcTrunc = src; | 232 CString srcTrunc = src; |
| 233 if (srcTrunc.GetLength() > 100) | 233 if (srcTrunc.GetLength() > 100) |
| 234 { | 234 { |
| 235 srcTrunc = src.Left(67) + L"..." + src.Right(30); | 235 srcTrunc = src.Left(67) + L"..." + src.Right(30); |
| 236 } | 236 } |
| 237 | 237 |
| 238 CString blocking; | 238 CString blocking; |
| 239 blocking.Format(L"Ignored %-12s %s %s", type, domain.IsEmpty()? L"-" : doma
in, srcTrunc); | 239 blocking.Format(L"Ignored %-12s %s %s", type, domain.empty()? L"-" : to_CSt
ring(domain), srcTrunc); |
| 240 | 240 |
| 241 DebugResult(blocking); | 241 DebugResult(blocking); |
| 242 } | 242 } |
| 243 | 243 |
| 244 #endif // ENABLE_DEBUG_RESULT_IGNORED | 244 #endif // ENABLE_DEBUG_RESULT_IGNORED |
| OLD | NEW |