53 #ifndef Foam_messageStream_H 54 #define Foam_messageStream_H 139 bool use_stderr =
false 145 const std::string&
title,
148 bool use_stderr =
false 204 const int afterVersion,
205 const char* functionName =
nullptr,
206 const char* sourceFileName =
nullptr,
207 const int sourceFileLineNumber = 0
227 const std::string& functionName
234 const char* functionName,
235 const char* sourceFileName,
236 const int sourceFileLineNumber = 0
243 const std::string& functionName,
244 const char* sourceFileName,
245 const int sourceFileLineNumber = 0
253 const char* functionName,
254 const char* sourceFileName,
255 const int sourceFileLineNumber,
256 const std::string& ioFileName,
257 const label ioStartLineNumber = -1,
258 const label ioEndLineNumber = -1
266 const char* functionName,
267 const char* sourceFileName,
268 const int sourceFileLineNumber,
277 const char* functionName,
278 const char* sourceFileName,
279 const int sourceFileLineNumber,
331 #define FUNCTION_NAME __PRETTY_FUNCTION__ 333 #define FUNCTION_NAME __func__ 339 #define SeriousErrorIn(functionName) \ 340 ::Foam::SeriousError((functionName), __FILE__, __LINE__) 344 #define SeriousErrorInFunction SeriousErrorIn(FUNCTION_NAME) 350 #define SeriousIOErrorIn(functionName, ios) \ 351 ::Foam::SeriousError((functionName), __FILE__, __LINE__, ios) 356 #define SeriousIOErrorInFunction(ios) SeriousIOErrorIn(FUNCTION_NAME, ios) 361 #define WarningIn(functionName) \ 362 ::Foam::Warning((functionName), __FILE__, __LINE__) 366 #define WarningInFunction WarningIn(FUNCTION_NAME) 370 #define DeprecatedInFunction(afterVersion) \ 371 ::Foam::Warning.deprecated(afterVersion, FUNCTION_NAME, __FILE__, __LINE__) 377 #define IOWarningIn(functionName, ios) \ 378 ::Foam::Warning((functionName), __FILE__, __LINE__, (ios)) 383 #define IOWarningInFunction(ios) IOWarningIn(FUNCTION_NAME, ios) 388 #define InfoIn(functionName) \ 389 ::Foam::Info((functionName), __FILE__, __LINE__) 393 #define InfoInFunction InfoIn(FUNCTION_NAME) 396 #define PoutIn(functionName) \ 397 ::Foam::Pout << (functionName) << ':' 400 #define PoutInFunction PoutIn(FUNCTION_NAME) 404 if (::Foam::infoDetailLevel > 0) Info 418 #define IOInfoIn(functionName, ios) \ 419 ::Foam::Info((functionName), __FILE__, __LINE__, (ios)) 424 #define IOInfoInFunction(ios) IOInfoIn(FUNCTION_NAME, ios) 435 #define DebugInFunction \ 436 if (debug) InfoInFunction 446 #define DebugPoutInFunction \ 447 if (debug) PoutInFunction 451 #define DebugVar(var) \ 453 ::Foam::string oldPrefix(::Foam::Pout.prefix()); \ 454 ::Foam::Pout<< "["<< __FILE__ << ":" << __LINE__ << "] "; \ 455 ::Foam::Pout.prefix() = oldPrefix + #var " "; \ 456 ::Foam::Pout<< var << ::Foam::endl; \ 457 ::Foam::Pout.prefix() = oldPrefix; \ const string & title() const noexcept
The title of this error type.
Generic output stream using a standard (STL) stream.
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...
messageStream(const char *title, errorSeverity severity, int maxErrors=0, bool use_stderr=false)
Construct from components.
OSstream & deprecated(const int afterVersion, const char *functionName=nullptr, const char *sourceFileName=nullptr, const int sourceFileLineNumber=0)
Report deprecation (after specified API version) with 'From function-name, source file...
int maxErrors_
The maximum number of errors before program termination.
OSstream & stream(OSstream *alternative=nullptr)
Return OSstream for output operations.
messageStream Warning
Warning stream (stdout output on master, null elsewhere), with additional 'FOAM Warning' header text...
OSstream & masterStream(const label communicator)
Return OSstream for output operations on the master process only, Snull on other processes.
An IOstream is an abstract base class for all input/output systems; be they streams, files, token lists etc.
General information output (stdout)
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.