AnCH Framework 0.1
Another C++ Hack Framework
 
Loading...
Searching...
No Matches
anch::logger::formatter::MessageFormatter Class Reference

#include <messageFormatter.hpp>

+ Collaboration diagram for anch::logger::formatter::MessageFormatter:

Public Member Functions

 MessageFormatter (const std::string &linePattern)
 
virtual ~MessageFormatter ()
 
const std::string formatMessage (const std::string &category, const anch::logger::Level &level, const std::string &message) const
 

Detailed Description

Format a message for logging acording writer configuration

Paterns are:

  • c: The category (logger name)
  • p: The logging level
  • m: The message
  • d{C++ time standard}: The date
  • D{C++ time standard}: The high precision date
  • t: The current thread ID
  • f: The function name (not imlpemented)
Author
Vincent Lachenal

Constructor & Destructor Documentation

◆ MessageFormatter()

anch::logger::formatter::MessageFormatter::MessageFormatter ( const std::string & linePattern)

MessageFormatter constructor

Parameters
linePatternThe message line pattern

◆ ~MessageFormatter()

virtual anch::logger::formatter::MessageFormatter::~MessageFormatter ( )
virtual

MessageFormatter destructor

Member Function Documentation

◆ formatMessage()

const std::string anch::logger::formatter::MessageFormatter::formatMessage ( const std::string & category,
const anch::logger::Level & level,
const std::string & message ) const

Format message.

Parameters
categoryThe logger category
levelThe logging level
messageThe logging message
Returns
The formatted message

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