BitShares-Core  6.1.0
BitShares blockchain implementation and command-line interface software
file_appender.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <fc/filesystem.hpp>
4 #include <fc/log/appender.hpp>
5 #include <fc/log/logger.hpp>
6 #include <fc/time.hpp>
7 
8 namespace fc {
9 
10 class file_appender : public appender {
11  public:
12  struct config {
13  config( const fc::path& p = "log.txt" );
14 
15  std::string format;
17  bool flush = true;
18  bool rotate = false;
22  };
23  file_appender( const variant& args );
25  virtual void log( const log_message& m )override;
26 
27  private:
28  class impl;
29  std::unique_ptr<impl> my;
30  };
31 } // namespace fc
32 
33 #include <fc/reflect/reflect.hpp>
#define FC_REFLECT(TYPE, MEMBERS)
Specializes fc::reflector for TYPE.
Definition: reflect.hpp:388
Defines types and macros used to provide reflection.
#define FC_MAX_LOG_OBJECT_DEPTH
Definition: config.hpp:8
virtual void log(const log_message &m) override
stores null, int64, uint64, double, bool, string, std::vector<variant>, and variant_object&#39;s.
Definition: variant.hpp:198
aggregates a message along with the context and associated meta-information.
Definition: api.hpp:15
config(const fc::path &p="log.txt")
wraps boost::filesystem::path to provide platform independent path manipulation.
Definition: filesystem.hpp:28
file_appender(const variant &args)