From a83d9d67113dc75d21a68dba14891ed5e1bea7ec Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Wed, 19 Jun 2019 08:30:46 -0700 Subject: Initial Commit of VPP OPflex Renderer Change-Id: I6264537538ad2646cddfa404de38a6bbf3abaa35 Signed-off-by: Neale Ranns --- src/include/VppLogHandler.hpp | 56 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 src/include/VppLogHandler.hpp (limited to 'src/include/VppLogHandler.hpp') diff --git a/src/include/VppLogHandler.hpp b/src/include/VppLogHandler.hpp new file mode 100644 index 0000000..eca4a94 --- /dev/null +++ b/src/include/VppLogHandler.hpp @@ -0,0 +1,56 @@ +/* -*- C++ -*-; c-basic-offset: 4; indent-tabs-mode: nil */ +/*! + * @file VppLogHandler.h + * @brief Interface definition file for AgentLogHandler + */ +/* + * Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + +#ifndef __VPP_LOG_HANDLER_H__ +#define __VPP_LOG_HANDLER_H__ + +#include + +namespace VPP +{ + +/** + * A VOM log handler that logs to the agnet logging mechanism + */ +class LogHandler : public VOM::log_t::handler +{ + public: + /** + * Constructor + */ + LogHandler() = default; + + /** + * Desctructor + */ + ~LogHandler() = default; + + /** + * Implement log_t::handler::handle_message + */ + void handle_message(const std::string &file, + const int line, + const std::string &function, + const VOM::log_level_t &level, + const std::string &message); + + private: + /** + * Copy Constructor + */ + LogHandler(const LogHandler &) = delete; +}; + +} /* namespace opflexagent */ + +#endif -- cgit 1.2.3-korg