Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: src/plugin/Config.h

Issue 29323611: Issue #1234, #2058 - Rewrite log facility, improving thread implementation
Patch Set: Created Aug. 19, 2015, 5:42 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 10 matching lines...) Expand all
21 #define TIMER_THREAD_SLEEP_TAB_LOOP 10000 21 #define TIMER_THREAD_SLEEP_TAB_LOOP 10000
22 22
23 // Should we to on debug information 23 // Should we to on debug information
24 #ifdef _DEBUG 24 #ifdef _DEBUG
25 #define ENABLE_DEBUG_INFO 25 #define ENABLE_DEBUG_INFO
26 #define ENABLE_DEBUG_GENERAL 26 #define ENABLE_DEBUG_GENERAL
27 #define ENABLE_DEBUG_ERROR 27 #define ENABLE_DEBUG_ERROR
28 28
29 #define ENABLE_DEBUG_RESULT 29 #define ENABLE_DEBUG_RESULT
30 #define ENABLE_DEBUG_RESULT_IGNORED 30 #define ENABLE_DEBUG_RESULT_IGNORED
31 #define ENABLE_DEBUG_SPLIT_FILE
32 #else 31 #else
33 #undef ENABLE_DEBUG_INFO 32 #undef ENABLE_DEBUG_INFO
34 #endif 33 #endif
35 34
36 #ifdef NDEBUG 35 #ifdef NDEBUG
37 #undef ENABLE_DEBUG_INFO 36 #undef ENABLE_DEBUG_INFO
38 #endif 37 #endif
39 38
40 #undef ENABLE_DEBUG_SELFTEST
41
42 #define DEBUG_FUNC CPluginDebug::Debug 39 #define DEBUG_FUNC CPluginDebug::Debug
43 40
44 #if (defined ENABLE_DEBUG_INFO && defined ENABLE_DEBUG_GENERAL) 41 #if (defined ENABLE_DEBUG_INFO && defined ENABLE_DEBUG_GENERAL)
45 #define DEBUG_GENERAL(x) DEBUG_FUNC(x); 42 #define DEBUG_GENERAL(x) DEBUG_FUNC(x);
46 #else 43 #else
47 #define DEBUG_GENERAL(x) 44 #define DEBUG_GENERAL(x)
48 #endif 45 #endif
49 46
50 #if (defined ENABLE_DEBUG_INFO && defined ENABLE_DEBUG_FILTER) 47 #if (defined ENABLE_DEBUG_INFO && defined ENABLE_DEBUG_FILTER)
51 #define DEBUG_FILTER(x) DEBUG_FUNC(x); 48 #define DEBUG_FILTER(x) DEBUG_FUNC(x);
(...skipping 25 matching lines...) Expand all
77 #define DEBUG_MUTEX(x) 74 #define DEBUG_MUTEX(x)
78 #endif 75 #endif
79 76
80 #if (defined ENABLE_DEBUG_INFO && defined ENABLE_DEBUG_HIDE_EL) 77 #if (defined ENABLE_DEBUG_INFO && defined ENABLE_DEBUG_HIDE_EL)
81 #define DEBUG_HIDE_EL(x) DEBUG_FUNC(x); 78 #define DEBUG_HIDE_EL(x) DEBUG_FUNC(x);
82 #else 79 #else
83 #define DEBUG_HIDE_EL(x) 80 #define DEBUG_HIDE_EL(x)
84 #endif 81 #endif
85 82
86 #if (defined ENABLE_DEBUG_INFO && defined ENABLE_DEBUG_ERROR) 83 #if (defined ENABLE_DEBUG_INFO && defined ENABLE_DEBUG_ERROR)
87 #define DEBUG_EXCEPTION(x) CPluginDebug::DebugException(x) 84 #define DEBUG_EXCEPTION(x) CPluginDebug::DebugException(x, Trace::Location())
88 #define DEBUG_ERROR_CODE(err, x) CPluginDebug::DebugErrorCode(err, x); 85 #define DEBUG_ERROR_CODE(err, x) CPluginDebug::DebugErrorCode(err, x, Trace::Loc ation());
89 #define DEBUG_ERROR_CODE_EX(err, x, process, thread) CPluginDebug::DebugErrorCod e(err, x, process, thread); 86 #define DEBUG_ERROR_LOG(err, id, subid, description) Trace::ErrorCode(err, descr iption, Trace::Location(id, subid))
87 #define DEBUG_SYSTEM_EXCEPTION(ex, id, subid, description) Trace::SystemExceptio n(ex, description, Trace::Location(id, subid))
90 #else 88 #else
91 #define DEBUG_EXCEPTION(x) 89 #define DEBUG_EXCEPTION(x)
92 #define DEBUG_ERROR_CODE(err, x) 90 #define DEBUG_ERROR_CODE(err, x)
93 #define DEBUG_ERROR_CODE_EX(err, x, process, thread) 91 #define DEBUG_ERROR_LOG(err, id, subid, description)
92 #define DEBUG_SYSTEM_EXCEPTION(ex, id, subid, description)
94 #endif 93 #endif
95 94
96 #define DEBUG_ERROR_LOG(err, id, subid, description) LogQueue::PostPluginError(e rr, id, subid, description);
97 #define DEBUG_SYSTEM_EXCEPTION(ex, id, subid, description) CPluginDebug::DebugSy stemException(ex, id, subid, description)
98 #define DEBUG_SELFTEST(x)
99 95
100 // ---------------------------------------------------------------------------- 96 // ----------------------------------------------------------------------------
101 // Miscellaneous 97 // Miscellaneous
102 // ---------------------------------------------------------------------------- 98 // ----------------------------------------------------------------------------
103 99
104 // Status bar pane name 100 // Status bar pane name
105 #define STATUSBAR_PANE_NAME L"AdblockPlusStatusBarPane" 101 #define STATUSBAR_PANE_NAME L"AdblockPlusStatusBarPane"
106 102
107 // Status bar pane number 103 // Status bar pane number
108 #define STATUSBAR_PANE_NUMBER 2 104 #define STATUSBAR_PANE_NUMBER 2
109 105
110 #define ENGINE_STARTUP_TIMEOUT 10000 106 #define ENGINE_STARTUP_TIMEOUT 10000
111 107
112 108
113 109
114 #endif // _CONFIG_H 110 #endif // _CONFIG_H
OLDNEW

Powered by Google App Engine
This is Rietveld