Sese Framework  2.3.0
A cross-platform framework
Loading...
Searching...
No Matches
sese::record::SimpleFormatter Class Referencefinal

Simple formatter class. More...

#include <SimpleFormatter.h>

Inheritance diagram for sese::record::SimpleFormatter:
sese::record::AbstractFormatter

Public Member Functions

 SimpleFormatter (const std::string &text_pattern=RECORD_DEFAULT_TEXT_PATTERN, const std::string &time_pattern=RECORD_DEFAULT_TIME_PATTERN) noexcept
 
std::string dump (const Event::Ptr &event) noexcept override
 
const char * getTextPattern () const noexcept
 
const char * getTimePattern () const noexcept
 
- Public Member Functions inherited from sese::record::AbstractFormatter
virtual ~AbstractFormatter () noexcept=default
 

Private Attributes

std::string textPattern
 
std::string timePattern
 

Additional Inherited Members

- Public Types inherited from sese::record::AbstractFormatter
typedef std::shared_ptr< AbstractFormatterPtr
 

Detailed Description

Simple formatter class.

Constructor & Destructor Documentation

◆ SimpleFormatter()

sese::record::SimpleFormatter::SimpleFormatter ( const std::string & text_pattern = RECORD_DEFAULT_TEXT_PATTERN,
const std::string & time_pattern = RECORD_DEFAULT_TIME_PATTERN )
explicitnoexcept

Default constructor

Parameters
text_patternFormat string, default is RECORD_DEFAULT_TEXT_PATTERN
See also
RECORD_DEFAULT_TEXT_PATTERN
* %    Escape symbol
* li   Line number
* lv   Log level
* fn   File name
* th   Thread ID
* tn   Thread name
* c    Complete time
* m    Content
* 
Parameters
time_patternTime format string

Member Function Documentation

◆ dump()

std::string sese::record::SimpleFormatter::dump ( const Event::Ptr & event)
overridevirtualnoexcept

◆ getTextPattern()

const char * sese::record::SimpleFormatter::getTextPattern ( ) const
inlinenodiscardnoexcept

References textPattern.

◆ getTimePattern()

const char * sese::record::SimpleFormatter::getTimePattern ( ) const
inlinenodiscardnoexcept

References timePattern.

Member Data Documentation

◆ textPattern

std::string sese::record::SimpleFormatter::textPattern
private

Referenced by getTextPattern().

◆ timePattern

std::string sese::record::SimpleFormatter::timePattern
private

Referenced by getTimePattern().


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