61 const string& message)
76 std::cerr << errorMessage;
87 std::cerr << errorMessage;
112 const string& delimiters,
113 const int indentation,
116 std::istringstream textStream(inputString);
123 for (
int i = 0; i < indentation - 1; i++)
125 indentationString +=
' ';
129 int spaceLeft = lineSize - 2;
132 while (textStream.good())
134 word =
getWord(textStream, delimiters);
135 if (spaceLeft < static_cast<int>(word.length()) + 3)
137 for ( ; spaceLeft > 2; spaceLeft--)
142 spaceLeft = lineSize - (
static_cast<int>(word.length()) + indentation);
148 spaceLeft -=
static_cast<int>(word.length());
151 if (textStream.get(c).good())
160 for ( ; spaceLeft > 2; spaceLeft--)
178 const string& delimiters)
183 while (textStream.get(c))
185 if (delimiters.find(c) != string::npos)
static void setLevel(const LogLevel actualLogLevel)
Set the log level.
static LogLevel slogLevel
Log level of the logger.
static std::string getWord(std::istringstream &textStream, const std::string &delimiters)
Extract a word from a string stream based on delimiters.
OutputMessage kOutFmtVerticalLine
Output message - vertical line.
static void log(const LogLevel queryLevel, const std::string &format, Args ... args)
Log desired activity for a given log level, version with string format.
static std::string wordWrapString(const std::string &inputString, const std::string &delimiters, const int indentation=0, const int lineSize=65)
static void flush(const LogLevel queryLevel)
Flush output messages.
static void errorAndTerminate(const std::string &errorMessage)
Log an error and terminate the execution.
LogLevel
Log level of the message.
The header file containing a class responsible for printing out info and error messages (stdout...
ErrorMessage kErrFmtTail
Error message tailer.
ErrorMessage kErrFmtHead
Error message header.
static void error(const std::string &errorMessage)
Log an error.