Wt: Wt::WLogEntry Class Reference

Wt 4.10.4

Loading...
Searching...
No Matches
Public Member Functions | List of all members
Wt::WLogEntry Class Reference

A stream-like object for creating an entry in a log file. More...

`#include <Wt/WLogger.h>`

## Public Member Functions
| WLogEntry (WLogEntry &&from)
| Move constructor.
| ~WLogEntry ()
| Destructor.
WLogEntry & | operator<< (const WLogger::Sep &)
| Writes a field separator.
WLogEntry & | operator<< (const WLogger::TimeStamp &)
| Writes a time stamp in the current field.
WLogEntry & | operator<< (const char *)
| Writes a string in the current field.
WLogEntry & | operator<< (const std::string &)
| Writes a string in the current field.
WLogEntry & | operator<< (const WString &)
| Writes a string in the current field.
WLogEntry & | operator<< (char)
| Writes a char value in the current field.
WLogEntry & | operator<< (int)
| Writes a number value in the current field.
WLogEntry & | operator<< (long long)
| Writes a number value in the current field.
WLogEntry & | operator<< (double)
| Writes a number value in the current field.
template<typename T >
WLogEntry & | operator<< (T *t)
| Writes a pointer value in the current field.
template<typename T >
WLogEntry & | operator<< (T t)
| Writes a value in the current field.

## Detailed Description

A stream-like object for creating an entry in a log file.

This class is returned by WLogger::entry() and creates a log entry using a stream-like interface.

## Constructor & Destructor Documentation

## ◆ WLogEntry()

Wt::WLogEntry::WLogEntry | ( | WLogEntry && | from | ) |

Move constructor.

This is mostly for returning a (newly constructed) WLogEntry from a function.

Appending to the from object after move construction has no effect.

## Member Function Documentation

## ◆ operator<<() [1/2]

WLogEntry & Wt::WLogEntry::operator<< | ( | const WLogger::Sep & |  | ) |

Writes a field separator.

You must separate fields in a single entry using the WLogger::sep constant.

## ◆ operator<<() [2/2]

WLogEntry & Wt::WLogEntry::operator<< | ( | const WLogger::TimeStamp & |  | ) |

Writes a time stamp in the current field.

Formats a timestamp (date+time) to the current field.