53#ifndef messageStream_H
54#define messageStream_H
189 const string& functionName
197 const char* functionName,
198 const char* sourceFileName,
199 const int sourceFileLineNumber = 0
206 const string& functionName,
207 const char* sourceFileName,
208 const int sourceFileLineNumber = 0
216 const char* functionName,
217 const char* sourceFileName,
218 const int sourceFileLineNumber,
219 const string& ioFileName,
220 const label ioStartLineNumber = -1,
221 const label ioEndLineNumber = -1
229 const char* functionName,
230 const char* sourceFileName,
231 const int sourceFileLineNumber,
240 const char* functionName,
241 const char* sourceFileName,
242 const int sourceFileLineNumber,
265extern messageStream
Info;
294 #define FUNCTION_NAME __PRETTY_FUNCTION__
296 #define FUNCTION_NAME __func__
302#define SeriousErrorIn(functionName) \
303 ::Foam::SeriousError((functionName), __FILE__, __LINE__)
307#define SeriousErrorInFunction SeriousErrorIn(FUNCTION_NAME)
313#define SeriousIOErrorIn(functionName, ios) \
314 ::Foam::SeriousError((functionName), __FILE__, __LINE__, ios)
319#define SeriousIOErrorInFunction(ios) SeriousIOErrorIn(FUNCTION_NAME, ios)
324#define WarningIn(functionName) \
325 ::Foam::Warning((functionName), __FILE__, __LINE__)
329#define WarningInFunction WarningIn(FUNCTION_NAME)
335#define IOWarningIn(functionName, ios) \
336 ::Foam::Warning((functionName), __FILE__, __LINE__, (ios))
341#define IOWarningInFunction(ios) IOWarningIn(FUNCTION_NAME, ios)
346#define InfoIn(functionName) \
347 ::Foam::Info((functionName), __FILE__, __LINE__)
351#define InfoInFunction InfoIn(FUNCTION_NAME)
354#define PoutIn(functionName) \
355 ::Foam::Pout << (functionName) << ':'
358#define PoutInFunction PoutIn(FUNCTION_NAME)
362 if (::Foam::infoDetailLevel > 0) Info
372#define IOInfoIn(functionName, ios) \
373 ::Foam::Info((functionName), __FILE__, __LINE__, (ios))
378#define IOInfoInFunction(ios) IOInfoIn(FUNCTION_NAME, ios)
389#define DebugInFunction \
390 if (debug) InfoInFunction
400#define DebugPoutInFunction \
401 if (debug) PoutInFunction
405#define DebugVar(var) \
407 ::Foam::string oldPrefix(::Foam::Pout.prefix()); \
408 ::Foam::Pout<< "["<< __FILE__ << ":" << __LINE__ << "] "; \
409 ::Foam::Pout.prefix() = oldPrefix + #var " "; \
410 ::Foam::Pout<< var << ::Foam::endl; \
411 ::Foam::Pout.prefix() = oldPrefix; \
An IOstream is an abstract base class for all input/output systems; be they streams,...
Generic output stream using a standard (STL) stream.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Handle output messages in a simple, consistent stream-based manner.
OSstream & masterStream(const label communicator)
OSstream & stream(OSstream *alternative=nullptr)
int maxErrors() const noexcept
The maximum number of errors before program termination.
errorSeverity
Message type, error severity flags.
@ INFO_STDERR
General information output (stderr)
@ INFO
General information output (stdout)
@ WARNING
Warning of possible problem.
@ SERIOUS
A serious problem - eg, data corruption.
std::ostream & stdStream()
Return std::ostream for output operations.
OSstream & operator()()
Explicitly convert to OSstream for << operations.
static int level
The output level (verbosity) of messages.
static int redirect
The output redirection of messages.
const string & title() const noexcept
The title of this error type.
const string & prefix() const noexcept
Return the stream prefix.
A class for handling character strings derived from std::string.
#define SeriousIOErrorIn(functionName, ios)
Report an IO error message using Foam::SeriousError.
#define PoutInFunction
Report using Foam::Pout with FUNCTION_NAME prefix.
#define WarningIn(functionName)
Report a warning using Foam::Warning.
#define IOWarningIn(functionName, ios)
Report an IO warning using Foam::Warning.
#define IOInfoIn(functionName, ios)
Report an IO information message using Foam::Info.
#define SeriousErrorIn(functionName)
Report an error message using Foam::SeriousError.
#define DebugVar(var)
Report a variable name and value.
#define InfoInFunction
Report an information message using Foam::Info.
#define InfoIn(functionName)
Report an information message using Foam::Info.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
messageStream SeriousError
int infoDetailLevel
Global for selective suppression of Info output.
messageStream InfoErr
Information stream (stderr output on master, null elsewhere)
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.