OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
logger::Collector Class Reference
+ Inheritance diagram for logger::Collector:
+ Collaboration diagram for logger::Collector:

Public Member Functions

 Collector (fs::path const &full_log_dir, LogOptions const &log_opts)
 
void store_file (fs::path const &path) override
 
uintmax_t scan_for_files (sinks::file::scan_method method, fs::path const &path=fs::path(), unsigned *counter=nullptr) override
 
void track_symlink (fs::path symlink_path)
 

Private Attributes

boost::shared_ptr
< sinks::file::collector > 
collector_
 
std::vector< fs::path > symlink_paths_
 

Detailed Description

Definition at line 241 of file Logger.cpp.

Constructor & Destructor Documentation

logger::Collector::Collector ( fs::path const &  full_log_dir,
LogOptions const &  log_opts 
)
inline

Definition at line 246 of file Logger.cpp.

247  : collector_(sinks::file::make_collector(
248  keywords::target = full_log_dir,
249  keywords::max_files = log_opts.max_files_,
250  keywords::min_free_space = log_opts.min_free_space_)) {}
boost::shared_ptr< sinks::file::collector > collector_
Definition: Logger.cpp:242

Member Function Documentation

uintmax_t logger::Collector::scan_for_files ( sinks::file::scan_method  method,
fs::path const &  path = fs::path(),
unsigned *  counter = nullptr 
)
inlineoverride

Definition at line 265 of file Logger.cpp.

267  {
268  return collector_->scan_for_files(method, path, counter);
269  }
boost::shared_ptr< sinks::file::collector > collector_
Definition: Logger.cpp:242
void logger::Collector::store_file ( fs::path const &  path)
inlineoverride

Definition at line 252 of file Logger.cpp.

252  {
253  collector_->store_file(path); // Deletes files that exceed rotation limits.
254  std::for_each(symlink_paths_.begin(), symlink_paths_.end(), RemoveDeadLink{});
255  }
std::vector< fs::path > symlink_paths_
Definition: Logger.cpp:243
boost::shared_ptr< sinks::file::collector > collector_
Definition: Logger.cpp:242
void logger::Collector::track_symlink ( fs::path  symlink_path)
inline

Definition at line 271 of file Logger.cpp.

271  {
272  symlink_paths_.emplace_back(std::move(symlink_path));
273  }
std::vector< fs::path > symlink_paths_
Definition: Logger.cpp:243

Member Data Documentation

boost::shared_ptr<sinks::file::collector> logger::Collector::collector_
private

Definition at line 242 of file Logger.cpp.

std::vector<fs::path> logger::Collector::symlink_paths_
private

Definition at line 243 of file Logger.cpp.


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