|
wibble
0.1.28
|
Prepend timestamps to log lines. More...
#include <filters.h>


Public Member Functions | |
| Timestamper (Sender *next=0, const std::string &fmt="%b %e %T ") | |
| virtual | ~Timestamper () |
| virtual void | send (Level level, const std::string &msg) |
| Log one line of text with the given level. | |
Public Attributes | |
| Sender * | next |
| std::string | fmt |
Prepend timestamps to log lines.
Timestamps are generated with a strftime format string on POSIX systems, or with simple asctime() on windows.
Strftime expands using a buffer 256 characters wide. Please keep that in mind when creating the format string: longer outputs will be truncated.
| wibble::log::Timestamper::Timestamper | ( | Sender * | next = 0, |
| const std::string & | fmt = "%b %e %T " |
||
| ) |
| wibble::log::Timestamper::~Timestamper | ( | ) | [virtual] |
| void wibble::log::Timestamper::send | ( | Level | level, |
| const std::string & | msg | ||
| ) | [virtual] |
Log one line of text with the given level.
Do not add a trailing newline
Implements wibble::log::Sender.
References fmt, next, wibble::grcal::date::now(), and wibble::log::Sender::send().
| std::string wibble::log::Timestamper::fmt |
Referenced by send().
Referenced by send().
1.7.6.1