54 #ifndef Foam_messageStream_H 55 #define Foam_messageStream_H 62 #include <string_view> 141 bool use_stderr =
false 150 bool use_stderr =
false 159 bool use_stderr =
false 199 int communicator = -1
215 const int afterVersion,
217 std::string_view functionName = std::string_view(),
219 std::string_view sourceFileName = std::string_view(),
221 const int sourceFileLineNumber = 0
242 std::string_view functionName,
244 std::string_view sourceFileName = std::string_view(),
246 const int sourceFileLineNumber = 0
255 std::string_view functionName,
257 std::string_view sourceFileName,
259 const int sourceFileLineNumber,
260 const std::string& ioFileName,
261 const label ioStartLineNumber = -1,
262 const label ioEndLineNumber = -1
271 std::string_view functionName,
273 std::string_view sourceFileName,
275 const int sourceFileLineNumber,
286 std::string_view functionName,
288 std::string_view sourceFileName,
290 const int sourceFileLineNumber,
343 #define FUNCTION_NAME __PRETTY_FUNCTION__ 345 #define FUNCTION_NAME __func__ 351 #define SeriousErrorIn(functionName) \ 352 ::Foam::SeriousError((functionName), __FILE__, __LINE__) 356 #define SeriousErrorInFunction SeriousErrorIn(FUNCTION_NAME) 362 #define SeriousIOErrorIn(functionName, ios) \ 363 ::Foam::SeriousError((functionName), __FILE__, __LINE__, ios) 368 #define SeriousIOErrorInFunction(ios) SeriousIOErrorIn(FUNCTION_NAME, ios) 373 #define WarningIn(functionName) \ 374 ::Foam::Warning((functionName), __FILE__, __LINE__) 378 #define WarningInFunction WarningIn(FUNCTION_NAME) 382 #define DeprecatedInFunction(afterVersion) \ 383 ::Foam::Warning.deprecated(afterVersion, FUNCTION_NAME, __FILE__, __LINE__) 389 #define IOWarningIn(functionName, ios) \ 390 ::Foam::Warning((functionName), __FILE__, __LINE__, (ios)) 395 #define IOWarningInFunction(ios) IOWarningIn(FUNCTION_NAME, ios) 400 #define InfoIn(functionName) \ 401 ::Foam::Info((functionName), __FILE__, __LINE__) 405 #define InfoInFunction InfoIn(FUNCTION_NAME) 408 #define PoutIn(functionName) \ 409 ::Foam::Pout << (functionName) << ':' 412 #define PoutInFunction PoutIn(FUNCTION_NAME) 416 if (::Foam::infoDetailLevel > 0) ::Foam::Info 420 if (log) ::Foam::Info 424 if (this->log) ::Foam::Info 430 #define IOInfoIn(functionName, ios) \ 431 ::Foam::Info((functionName), __FILE__, __LINE__, (ios)) 436 #define IOInfoInFunction(ios) IOInfoIn(FUNCTION_NAME, ios) 442 if (debug) ::Foam::Info 447 #define DebugInFunction \ 448 if (debug) InfoInFunction 453 if (debug) ::Foam::Pout 458 #define DebugPoutInFunction \ 459 if (debug) PoutInFunction 463 #define DebugVar(var) \ 465 ::Foam::string oldPrefix(::Foam::Pout.prefix()); \ 466 ::Foam::Pout<< "["<< __FILE__ << ":" << __LINE__ << "] "; \ 467 ::Foam::Pout.prefix() = oldPrefix + #var " "; \ 468 ::Foam::Pout<< var << ::Foam::endl; \ 469 ::Foam::Pout.prefix() = oldPrefix; \ const string & title() const noexcept
The title of this error type.
Generic output stream using a standard (STL) stream.
OSstream & deprecated(const int afterVersion, std::string_view functionName=std::string_view(), std::string_view sourceFileName=std::string_view(), const int sourceFileLineNumber=0)
Report deprecation (after specified API version) with 'From function-name, source file...
messageStream InfoErr
Information stream (stderr output on master, null elsewhere)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Warning of possible problem.
int infoDetailLevel
Global for selective suppression of Info output.
std::ostream & stdStream()
Return std::ostream for output operations.
int errorCount_
The current number of errors counted.
Handle output messages in a simple, consistent stream-based manner.
static int redirect
The output redirection of messages.
messageStream SeriousError
Error stream (stdout output on all processes), with additional 'FOAM Serious Error' header text...
int maxErrors_
The maximum number of errors before program termination.
OSstream & stream(OSstream *alternative=nullptr, int communicator=-1)
Return OSstream for output operations.
messageStream(errorSeverity severity, int maxErrors=0, bool use_stderr=false)
Construct untitled with given characteristics.
messageStream Warning
Warning stream (stdout output on master, null elsewhere), with additional 'FOAM Warning' header text...
An IOstream is an abstract base class for all input/output systems; be they streams, files, token lists etc.
General information output (stdout)
OSstream & masterStream(int communicator)
Return OSstream for output operations on the master process only, Snull on other processes.
int maxErrors() const noexcept
The maximum number of errors before program termination.
errorSeverity
Message type, error severity flags.
messageStream Info
Information stream (stdout output on master, null elsewhere)
int severity_
The message type / error severity, possibly with USE_STDERR mask.
A serious problem - eg, data corruption.
static int level
The output level (verbosity) of messages.
Bitmask for stderr output (for the above enums)
OSstream & operator()()
Explicitly convert to OSstream for << operations.
string title_
The title of this error type.