blob: eca4a940f3a01d07ad97149540fb66ceaa4b5550 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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 <vom/logger.hpp>
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
|