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

Unified Diff: include/AdblockPlus/LogSystem.h

Issue 5728380594946048: Issue 116 - Document the libadblockplus API (Closed)
Patch Set: Fix broken sentences Created Sept. 2, 2014, 5:43 a.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/JsValue.h ('k') | include/AdblockPlus/ReferrerMapping.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/AdblockPlus/LogSystem.h
===================================================================
--- a/include/AdblockPlus/LogSystem.h
+++ b/include/AdblockPlus/LogSystem.h
@@ -24,16 +24,33 @@
namespace AdblockPlus
{
+ /**
+ * Logging interface.
+ */
class LogSystem
{
public:
+ /**
+ * Log level.
+ */
enum LogLevel {LOG_LEVEL_TRACE, LOG_LEVEL_LOG, LOG_LEVEL_INFO, LOG_LEVEL_WARN, LOG_LEVEL_ERROR};
virtual ~LogSystem() {}
+
+ /**
+ * Writes a log message.
+ * @param logLevel Log level.
+ * @param message Log message.
+ * @param source Source of the message, e.g. file name and line.
+ * Ignored when empty.
+ */
virtual void operator()(LogLevel logLevel, const std::string& message,
const std::string& source) = 0;
};
+ /**
+ * Shared smart pointer to a `LogSystem` instance.
+ */
typedef std::tr1::shared_ptr<LogSystem> LogSystemPtr;
}
« no previous file with comments | « include/AdblockPlus/JsValue.h ('k') | include/AdblockPlus/ReferrerMapping.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld