Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::sinks::file::rotation_at_time_point Class Reference

The class represents the time point of log file rotation. More...

#include <text_file_backend.hpp>

Public Types

typedef bool result_type
 

Public Member Functions

BOOST_LOG_API rotation_at_time_point (unsigned char hour, unsigned char minute, unsigned char second)
 Creates a rotation time point of every day at the specified time. More...
 
BOOST_LOG_API rotation_at_time_point (date_time::weekdays wday, unsigned char hour=0, unsigned char minute=0, unsigned char second=0)
 Creates a rotation time point of each specified weekday at the specified time. More...
 
BOOST_LOG_API rotation_at_time_point (gregorian::greg_day mday, unsigned char hour=0, unsigned char minute=0, unsigned char second=0)
 Creates a rotation time point of each specified day of month at the specified time. More...
 
BOOST_LOG_API bool operator() () const
 Checks if it's time to rotate the file. More...
 

Detailed Description

The class represents the time point of log file rotation.

One can specify one of three types of time point based rotation:

  • rotation takes place every day, at the specified time
  • rotation takes place on the specified day of every week, at the specified time
  • rotation takes place on the specified day of every month, at the specified time

The time points are considered to be local time.

Member Typedef Documentation

Constructor & Destructor Documentation

BOOST_LOG_API boost::sinks::file::rotation_at_time_point::rotation_at_time_point ( unsigned char  hour,
unsigned char  minute,
unsigned char  second 
)
explicit

Creates a rotation time point of every day at the specified time.

Parameters
hourThe rotation hour, should be within 0 and 23
minuteThe rotation minute, should be within 0 and 59
secondThe rotation second, should be within 0 and 59
BOOST_LOG_API boost::sinks::file::rotation_at_time_point::rotation_at_time_point ( date_time::weekdays  wday,
unsigned char  hour = 0,
unsigned char  minute = 0,
unsigned char  second = 0 
)
explicit

Creates a rotation time point of each specified weekday at the specified time.

Parameters
wdayThe weekday of the rotation
hourThe rotation hour, should be within 0 and 23
minuteThe rotation minute, should be within 0 and 59
secondThe rotation second, should be within 0 and 59
BOOST_LOG_API boost::sinks::file::rotation_at_time_point::rotation_at_time_point ( gregorian::greg_day  mday,
unsigned char  hour = 0,
unsigned char  minute = 0,
unsigned char  second = 0 
)
explicit

Creates a rotation time point of each specified day of month at the specified time.

Parameters
mdayThe monthday of the rotation, should be within 1 and 31
hourThe rotation hour, should be within 0 and 23
minuteThe rotation minute, should be within 0 and 59
secondThe rotation second, should be within 0 and 59

Member Function Documentation

BOOST_LOG_API bool boost::sinks::file::rotation_at_time_point::operator() ( ) const

Checks if it's time to rotate the file.


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