MACSio  0.9
Multi-purpose, Application-Centric, Scalable I/O Proxy App
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
macsio_log.h File Reference
#include <mpi.h>
#include <errno.h>
#include <stdio.h>

Go to the source code of this file.

Macros

#define MACSIO_LOG_DEFAULT_LINE_COUNT   64
 
#define MACSIO_LOG_DEFAULT_EXTRA_LINES   64
 
#define MACSIO_LOG_DEFAULT_LINE_LENGTH   128
 
#define MACSIO_LOG_MSG(SEV, MSG)   MACSIO_LOG_MSG2(MACSIO_LOG_MainLog, MSG, MACSIO_LOG_Msg ## SEV, #SEV, errno, mpi_errno, __FILE__, __LINE__)
 Convenience macro for logging a message to the main log. More...
 
#define MACSIO_LOG_MSGV(VSEV, MSG)
 
#define MACSIO_LOG_MSGL(LOG, SEV, MSG)   MACSIO_LOG_MSG2(LOG, MSG, MACSIO_LOG_Msg ## SEV, #SEV, errno, mpi_errno, __FILE__, __LINE__)
 Convenience macro for logging a message to any specific log. More...
 
#define MACSIO_LOG_MSGLV(LOG, VSEV, MSG)
 Convenience macro for logging a message with variable severity to any specific log. More...
 

Typedefs

typedef enum
_MACSIO_LOG_MsgSeverity_t 
MACSIO_LOG_MsgSeverity_t
 
typedef struct
_MACSIO_LOG_LogHandle_t 
MACSIO_LOG_LogHandle_t
 

Enumerations

enum  _MACSIO_LOG_MsgSeverity_t {
  MACSIO_LOG_MsgDbg1, MACSIO_LOG_MsgDbg2, MACSIO_LOG_MsgDbg3, MACSIO_LOG_MsgInfo,
  MACSIO_LOG_MsgWarn, MACSIO_LOG_MsgErr, MACSIO_LOG_MsgDie
}
 

Functions

char const * MACSIO_LOG_MakeMsg (char const *format,...)
 Internal convenience method to build a message from a printf-style format string and args. More...
 
MACSIO_LOG_LogHandle_tMACSIO_LOG_LogInit (MPI_Comm comm, char const *path, int line_len, int lines_per_proc, int extra_lines_proc0)
 Initialize a log. More...
 
void MACSIO_LOG_LogMsg (MACSIO_LOG_LogHandle_t const *log, char const *fmt,...)
 Issue a printf-style message to a log. More...
 
void MACSIO_LOG_LogMsgWithDetails (MACSIO_LOG_LogHandle_t const *log, char const *linemsg, MACSIO_LOG_MsgSeverity_t sevVal, char const *sevStr, int sysErrno, int mpiErrno, char const *theFile, int theLine)
 Convenience method for building a detailed message for a log. More...
 
void MACSIO_LOG_LogFinalize (MACSIO_LOG_LogHandle_t *log)
 Finalize and close an open log Should be called collectively by all processors that created the log. More...
 

Variables

int mpi_errno
 Error code returned by most recent MPI call. More...
 
int MACSIO_LOG_DebugLevel
 
MACSIO_LOG_LogHandle_tMACSIO_LOG_MainLog
 Log handle for MACSIO's main log. More...
 
MACSIO_LOG_LogHandle_tMACSIO_LOG_StdErr
 Log handle for MACSIO's stderr output. More...