Boost C++ Libraries

PrevUpHomeNext

Class rotation_at_time_interval

boost::log::sinks::file::rotation_at_time_interval

Synopsis

// In header: <boost/log/sinks/text_file_backend.hpp>


class rotation_at_time_interval {
public:
  // types
  typedef bool result_type;

  // construct/copy/destruct
  explicit rotation_at_time_interval(posix_time::time_duration const &);

  // public member functions
  bool operator()() const;
};

Description

The class represents the time interval of log file rotation. The log file will be rotated after the specified time interval has passed.

rotation_at_time_interval public construct/copy/destruct

  1. explicit rotation_at_time_interval(posix_time::time_duration const & interval);

    Creates a rotation time interval of the specified duration

    Parameters:
    interval

    The interval of the rotation, should be no less than 1 second

rotation_at_time_interval public member functions

  1. bool operator()() const;

    Checks if it's time to rotate the file


PrevUpHomeNext