#include <IpJournalist.hpp>
). This class is the base class for all Journals. It controls the acceptance criteria for print statements etc. Derived classes like the FileJournal - output those messages to specific locations
Public Member Functions | |
Journal (const std::string &name, EJournalLevel default_level) | |
Constructor. | |
virtual | ~Journal () |
Destructor. | |
std::string | Name () |
Get the name of the Journal. | |
void | SetPrintLevel (EJournalCategory category, EJournalLevel level) |
Set the print level for a particular category. | |
void | SetAllPrintLevels (EJournalLevel level) |
Set the print level for all category. | |
Journal Output Methods. These methods are called by the | |
Journalist who first checks if the output print level and category are acceptable.
Calling the Print methods explicitly (instead of through the Journalist will output the message regardless of print level and category. You should use the Journalist to print & flush instead | |
bool | IsAccepted (EJournalCategory category, EJournalLevel level) const |
Ask if a particular print level/category is accepted by the journal. | |
void | Print (const char *str) |
Print to the designated output location. | |
void | Printf (const char *pformat, va_list ap) |
Printf to the designated output location. | |
void | FlushBuffer () |
Flush output buffer. | |
Protected Member Functions | |
Implementation version of Print methods. Derived classes | |
should overload the Impl methods. | |
virtual void | PrintImpl (const char *str)=0 |
Print to the designated output location. | |
virtual void | PrintfImpl (const char *pformat, va_list ap)=0 |
Printf to the designated output location. | |
virtual void | FlushBufferImpl ()=0 |
Flush output buffer. |
Journal | ( | const std::string & | name, | |
EJournalLevel | default_level | |||
) |
~Journal | ( | ) | [virtual] |
Destructor.
std::string Name | ( | ) |
Get the name of the Journal.
void SetPrintLevel | ( | EJournalCategory | category, | |
EJournalLevel | level | |||
) |
Set the print level for a particular category.
void SetAllPrintLevels | ( | EJournalLevel | level | ) |
bool IsAccepted | ( | EJournalCategory | category, | |
EJournalLevel | level | |||
) | const |
Ask if a particular print level/category is accepted by the journal.
void Print | ( | const char * | str | ) | [inline] |
void Printf | ( | const char * | pformat, | |
va_list | ap | |||
) | [inline] |
void FlushBuffer | ( | ) | [inline] |
virtual void PrintImpl | ( | const char * | str | ) | [protected, pure virtual] |
Print to the designated output location.
Implemented in FileJournal.
Referenced by Journal::Print().
virtual void PrintfImpl | ( | const char * | pformat, | |
va_list | ap | |||
) | [protected, pure virtual] |
Printf to the designated output location.
Implemented in FileJournal.
Referenced by Journal::Printf().
virtual void FlushBufferImpl | ( | ) | [protected, pure virtual] |