67 const string& message)
84 std::cerr << errorMessage;
97 std::cerr << errorMessage;
131 const string& delimiters,
132 const int indentation,
135 std::istringstream textStream(inputString);
142 for (
int i = 0; i < indentation - 1; i++)
144 indentationString +=
' ';
148 int spaceLeft = lineSize - 2;
151 while (textStream.good())
153 word =
GetWord(textStream, delimiters);
154 if (spaceLeft < (
int) word.length() + 3)
156 for ( ; spaceLeft > 2; spaceLeft--)
161 spaceLeft = lineSize - (word.length() + indentation);
167 spaceLeft -= word.length();
170 if (textStream.get(c).good())
179 for ( ; spaceLeft > 2; spaceLeft--)
201 const string& delimiters)
206 while (textStream.get(c))
208 if (delimiters.find(c) != string::npos)
static std::string WordWrapString(const std::string &inputString, const std::string &delimiters, const int indentation=0, const int lineSize=65)
Wrap the line based on logger conventions.
static TLogLevel logLevel
Log level of the logger.
static void SetLevel(const TLogLevel actualLogLevel)
Set the log level.
static void Error(const std::string &errorMessage)
Log an error.
static void ErrorAndTerminate(const std::string &errorMessage)
Log an error and terminate the execution.
static std::string GetWord(std::istringstream &textStream, const std::string &delimiters)
Extract a word (string between two delimiters)
The header file containing a class responsible for printing out info and error messages (stdout...
TLogLevel
Log level of the message.
static void Flush(const TLogLevel queryLevel)
Flush output messages.
TOutputMessage OUT_FMT_VERTICAL_LINE
Output message - vertical line.
TErrorMessage ERR_FMT_HEAD
Error message header.
TErrorMessage ERR_FMT_TAIL
Error message tailer.
static void Log(const TLogLevel queryLevel, const std::string &format, Args...args)
Log desired activity for a given log level, version with string format.