Fast Methods for Cosmological Simulations
FastSim serves as a tool for quick N-body simulations in modified gravity.
anonymous_namespace{main.cpp}::Logger Class Reference

Public Member Functions

 Logger (const std::string &filename)
 
 ~Logger ()
 

Private Attributes

boost::shared_ptr< sink_tg_file_sink
 

Detailed Description

Definition at line 52 of file main.cpp.

Constructor & Destructor Documentation

anonymous_namespace{main.cpp}::Logger::Logger ( const std::string &  filename)
inline

Definition at line 55 of file main.cpp.

55  :
56  g_file_sink(logging::add_file_log(
57  keywords::file_name = filename,
58  keywords::time_based_rotation = sinks::file::rotation_at_time_interval(boost::posix_time::hours(1)),
59  keywords::format = "[%TimeStamp%] <%Severity%>: %Message%"
60  ))
61  {
62  g_file_sink->set_filter(logging::trivial::severity >= logging::trivial::debug);
63  }
boost::shared_ptr< sink_t > g_file_sink
Definition: main.cpp:72
anonymous_namespace{main.cpp}::Logger::~Logger ( )
inline

Definition at line 64 of file main.cpp.

65  {
66  // close the log file
67  logging::core::get()->remove_sink(g_file_sink);
68  g_file_sink.reset();
69  }
boost::shared_ptr< sink_t > g_file_sink
Definition: main.cpp:72

Member Data Documentation

boost::shared_ptr< sink_t > anonymous_namespace{main.cpp}::Logger::g_file_sink
private

Definition at line 72 of file main.cpp.


The documentation for this class was generated from the following file: