boost::logging::formatter::high_precision_time_t< convert > Struct Template Reference

Prefixes the message with a high-precision time (. You pass the format string at construction. More...

Inheritance diagram for boost::logging::formatter::high_precision_time_t< convert >:
[legend]
Collaboration diagram for boost::logging::formatter::high_precision_time_t< convert >:
[legend]

List of all members.

Public Member Functions

 high_precision_time_t (const hold_string_type &format)
void configure (const hold_string_type &str)
 configure through script


Detailed Description

template<class convert = do_convert_format::prepend>
struct boost::logging::formatter::high_precision_time_t< convert >

Prefixes the message with a high-precision time (. You pass the format string at construction.

#include <boost/logging/format/formatter/high_precision_time.hpp>

Internally, it uses boost::date_time::microsec_time_clock. So, our precision matches this class.

The format can contain escape sequences: $dd - day, 2 digits $MM - month, 2 digits $yy - year, 2 digits $yyyy - year, 4 digits $hh - hour, 2 digits $mm - minute, 2 digits $ss - second, 2 digits $mili - milliseconds $micro - microseconds (if the high precision clock allows; otherwise, it pads zeros) $nano - nanoseconds (if the high precision clock allows; otherwise, it pads zeros)

Example:

high_precision_time("$mm:$ss:$micro");

Parameters:
convert [optional] In case there needs to be a conversion between std::(w)string and the string that holds your logged message. See convert_format. For instance, you might use a cached_string class (see optimize namespace).

Constructor & Destructor Documentation

template<class convert = do_convert_format::prepend>
boost::logging::formatter::high_precision_time_t< convert >::high_precision_time_t ( const hold_string_type &  format  )  [inline]

constructs a high_precision_time object


Member Function Documentation

template<class convert = do_convert_format::prepend>
void boost::logging::formatter::high_precision_time_t< convert >::configure ( const hold_string_type &  str  )  [inline, virtual]

configure through script

the string = the time format

Reimplemented from boost::logging::manipulator::is_generic.


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

Copyright John Torjo © 2007
Have a question/ suggestion/ comment? Send me feedback