1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 
  11 
  12 
  13 
  14 #ifndef SHMEM_API_LOGGER_H
  15 #define SHMEM_API_LOGGER_H
  16 
  17 #include "oshmem_config.h"
  18 #include "opal/util/output.h"
  19 
  20 #include "oshmem/util/oshmem_util.h"
  21 
  22 OSHMEM_DECLSPEC extern int shmem_api_logger_output;
  23 
  24 #ifdef __BASE_FILE__
  25 #define __SPML_FILE__ __BASE_FILE__
  26 #else
  27 #define __SPML_FILE__ __FILE__
  28 #endif
  29 
  30 #ifdef OPAL_ENABLE_DEBUG
  31 #define SHMEM_API_VERBOSE(level, ...) \
  32     oshmem_output_verbose(level, shmem_api_logger_output, \
  33         "%s:%d - %s()", __SPML_FILE__, __LINE__, __func__, __VA_ARGS__)
  34 #else
  35 #define SHMEM_API_VERBOSE(level, ...)
  36 #endif
  37 
  38 #define SHMEM_API_ERROR(...) \
  39     oshmem_output(shmem_api_logger_output, \
  40         "Error: %s:%d - %s()", __SPML_FILE__, __LINE__, __func__, __VA_ARGS__)
  41 
  42 #endif