| 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 |