wibble::log::Timestamper Struct Reference

Prepend timestamps to log lines. More...

`#include <filters.h>`

Inheritance diagram for wibble::log::Timestamper:
[legend]
Collaboration diagram for wibble::log::Timestamper:
[legend]

## 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. More...
Public Member Functions inherited from wibble::log::Sender
virtual | ~Sender ()

## Public Attributes

Sender * | next
std::string | fmt

## Detailed Description

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.

## Constructor & Destructor Documentation

## Timestamper()

wibble::log::Timestamper::Timestamper | ( | Sender * | next = `0`,
|  | const std::string & | fmt = `"%b %e %T "`
| ) |  |

## ~Timestamper()

wibble::log::Timestamper::~Timestamper | ( |  | ) |

virtual

## Member Function Documentation

## send()

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().

## Member Data Documentation

## fmt

std::string wibble::log::Timestamper::fmt

Referenced by send().

## next

Sender* wibble::log::Timestamper::next

Referenced by send().

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

- filters.h
- filters.cpp