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

Unified Diff: include/AdblockPlus/LogSystem.h

Issue 10524054: Rename ErrorCallback into LogSystem, provide a proper console API (Closed)
Patch Set: Created May 10, 2013, 2:01 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/AdblockPlus/JsEngine.h ('k') | libadblockplus.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/AdblockPlus/LogSystem.h
===================================================================
rename from include/AdblockPlus/ErrorCallback.h
rename to include/AdblockPlus/LogSystem.h
--- a/include/AdblockPlus/ErrorCallback.h
+++ b/include/AdblockPlus/LogSystem.h
@@ -10,28 +10,31 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef ADBLOCK_PLUS_ERROR_CALLBACK_H
-#define ADBLOCK_PLUS_ERROR_CALLBACK_H
+#ifndef ADBLOCK_PLUS_LOG_SYSTEM_H
+#define ADBLOCK_PLUS_LOG_SYSTEM_H
#include <string>
#include "tr1_memory.h"
namespace AdblockPlus
{
- class ErrorCallback
+ class LogSystem
{
public:
- virtual ~ErrorCallback();
- virtual void operator()(const std::string& message) = 0;
+ enum LogLevel {TRACE, LOG, INFO, WARN, ERROR};
Felix Dahlke 2013/05/13 07:20:15 The common approach is to prefix enum values with
+
+ virtual ~LogSystem() {}
+ virtual void operator()(LogLevel logLevel, const std::string& message,
+ const std::string& source) = 0;
};
- typedef std::tr1::shared_ptr<ErrorCallback> ErrorCallbackPtr;
+ typedef std::tr1::shared_ptr<LogSystem> LogSystemPtr;
}
#endif
« no previous file with comments | « include/AdblockPlus/JsEngine.h ('k') | libadblockplus.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld