root/oshmem/shmem/shmem_api_logger.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  * Copyright (c) 2013      Mellanox Technologies, Inc.
   3  *                         All rights reserved.
   4  * Copyright (c) 2015 Cisco Systems, Inc.  All rights reserved.
   5  * $COPYRIGHT$
   6  *
   7  * Additional copyrights may follow
   8  *
   9  * $HEADER$
  10  */
  11 /**
  12  * @file
  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 /*SHMEM_API_LOGGER_H*/

/* [<][>][^][v][top][bottom][index][help] */