Boost C++ Libraries

PrevUpHomeNext

Class template fmt_date_time_facade

boost::log::formatters::fmt_date_time_facade — Date and time attribute formatter.

Synopsis

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

template<typename CharT, typename AttributeValueTypesT, 
         template< typename > class FormatterImplT, typename ExceptionPolicyT> 
class fmt_date_time_facade : public basic_formatter< CharT, fmt_date_time_facade< CharT, AttributeValueTypesT, FormatterImplT, ExceptionPolicyT > >
{
public:
  // types
  typedef base_type::char_type    char_type;     // Character type. 
  typedef base_type::string_type  string_type;   // String type. 
  typedef base_type::ostream_type ostream_type;  // Stream type. 
  typedef base_type::record_type  record_type;   // Log record type. 

  // construct/copy/destruct
  explicit fmt_date_time_facade(string_type const &);
  template<typename ArgsT> 
    fmt_date_time_facade(string_type const &, ArgsT const &);

  // public member functions
  void operator()(ostream_type &, record_type const &) const;
};

Description

The formatter performs formatting for all date and time related types.

fmt_date_time_facade public construct/copy/destruct

  1. explicit fmt_date_time_facade(string_type const & name);

    Constructor

    Parameters:
    name

    Attribute name

  2. template<typename ArgsT> 
      fmt_date_time_facade(string_type const & name, ArgsT const & args);

    Constructor with date and time format specification

    Parameters:
    args

    A set of named arguments that describe the format

    name

    Attribute name

fmt_date_time_facade public member functions

  1. void operator()(ostream_type & strm, record_type const & record) const;

    Formatting operator. Formats the attribute with the specified on construction name from attrs and puts the result into the strm stream.

    Parameters:
    record

    A logging record

    strm

    A reference to the stream, where the final text of the logging record is composed


PrevUpHomeNext