Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
appender.hpp
Go to the documentation of this file.
1#pragma once
2#include <fc/any.hpp>
3#include <fc/string.hpp>
4#include <memory>
5
6#if BOOST_VERSION >= 106600
7namespace boost { namespace asio { class io_context; typedef io_context io_service; } }
8#else
9namespace boost { namespace asio { class io_service; } }
10#endif
11
12namespace fc {
13 class appender;
14 class log_message;
15 class variant;
16
18 public:
19 typedef std::shared_ptr<appender_factory> ptr;
20
21 virtual ~appender_factory(){};
22 virtual std::shared_ptr<appender> create( const variant& args ) = 0;
23 };
24
25 namespace detail {
26 template<typename T>
28 public:
29 virtual std::shared_ptr<appender> create( const variant& args ) {
30 return std::shared_ptr<appender>(new T(args));
31 }
32 };
33 }
34
35 class appender {
36 public:
37 typedef std::shared_ptr<appender> ptr;
38
39 virtual void initialize( boost::asio::io_service& io_service ) = 0;
40 virtual void log( const log_message& m ) = 0;
41 };
42}
std::shared_ptr< appender_factory > ptr
Definition appender.hpp:19
virtual std::shared_ptr< appender > create(const variant &args)=0
virtual ~appender_factory()
Definition appender.hpp:21
virtual void log(const log_message &m)=0
std::shared_ptr< appender > ptr
Definition appender.hpp:37
virtual void initialize(boost::asio::io_service &io_service)=0
virtual std::shared_ptr< appender > create(const variant &args)
Definition appender.hpp:29
aggregates a message along with the context and associated meta-information.
stores null, int64, uint64, double, bool, string, std::vector<variant>, and variant_object's.
Definition variant.hpp:191
namespace sysio::chain
Definition authority.cpp:3
#define T(meth, val, expected)