Boost C++ Libraries

PrevUpHomeNext

Function template time_period

boost::log::formatters::time_period

Synopsis

// In header: <boost/log/formatters/date_time.hpp>


template<typename AttributeValueTypesT, typename CharT, typename... ArgsT> 
  fmt_date_time_facade< CharT, AttributeValueTypesT, implementation_defined, no_throw_policy > 
  time_period(std::basic_string< CharT > const & name, ArgsT...const & args, 
              std::nothrow_t const &);

Description

Formatter generator with the explicitly specified set of supported types in the first template parameter. The formatter will not throw if the attribute value is not found in the record being formatted. Instead, no output will be produced for this attribute value.

Parameters:
args

Optional named arguments. Supported arguments:

  • unit_format - format string for period boundaries, must be compliant with Boost.DateTime date and time format string specification. Default: %Y-%b-%d %H:%M:%S.%f

  • format - format string for boundaries composition, can contain placeholders %begin%, %end% and %last%. Default: [%begin% - %last%]

name

Attribute name


PrevUpHomeNext