INGOR
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ytLog Class Reference

Routines for error logging. More...

#include <ytLog.h>

Public Member Functions

#define ytLog_FATAL_ERROR
 constant bit flag for printing "FATAL ERROR" prefix.
 
void ytLog_errf (int code, const char *format,...)
 Outputs an error message with printf style formatting.
 

Detailed Description

Routines for error logging.

Member Function Documentation

◆ ytLog_errf()

void ytLog_errf ( int  code,
const char *  format,
  ... 
)

Outputs an error message with printf style formatting.

This function outputs an message to the ytLib_ERR file pointer, which is the standard error output file pointer of the YTLIB library. If the pointer does not point to stderr, it duplicates the message and outputs to both ytLib_ERR and stderr.

The prefix "ERROR" or "FATAL ERROR" is output, followed by rank number with "( )" if MPI enabled, error code with "[ ]", and the given messsage.

Parameters
codeError code. Set ytLog_FATAL_ERROR bit to output "FATAL ERROR" prefix instead of "ERROR" prefix.
formatformat string same as the printf standard library function.

The documentation for this class was generated from the following file: