Changeset f5be115


Ignore:
Timestamp:
Sep 22, 2016, 10:34:00 PM (7 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
0000669
Parents:
c8228c7
Message:

src/aubio_priv.h: use new logging function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/aubio_priv.h

    rc8228c7 rf5be115  
    173173} aubio_status;
    174174
     175/* Logging */
     176
     177#include "utils/log.h"
     178
     179/** internal logging function, defined in utils/log.c */
     180uint_t aubio_log(sint_t level, const char_t *fmt, ...);
     181
    175182#ifdef HAVE_C99_VARARGS_MACROS
    176 #define AUBIO_ERR(...)               fprintf(stderr, "AUBIO ERROR: " __VA_ARGS__)
    177 #define AUBIO_MSG(...)               fprintf(stdout, __VA_ARGS__)
    178 #define AUBIO_DBG(...)               fprintf(stderr, __VA_ARGS__)
    179 #define AUBIO_WRN(...)               fprintf(stderr, "AUBIO WARNING: " __VA_ARGS__)
    180 #else
    181 #define AUBIO_ERR(format, args...)   fprintf(stderr, "AUBIO ERROR: " format , ##args)
    182 #define AUBIO_MSG(format, args...)   fprintf(stdout, format , ##args)
    183 #define AUBIO_DBG(format, args...)   fprintf(stderr, format , ##args)
    184 #define AUBIO_WRN(format, args...)   fprintf(stderr, "AUBIO WARNING: " format, ##args)
     183#define AUBIO_ERR(...)               aubio_log(AUBIO_LOG_ERR, "AUBIO ERROR: " __VA_ARGS__)
     184#define AUBIO_MSG(...)               aubio_log(AUBIO_LOG_MSG, __VA_ARGS__)
     185#define AUBIO_DBG(...)               aubio_log(AUBIO_LOG_DBG, __VA_ARGS__)
     186#define AUBIO_WRN(...)               aubio_log(AUBIO_LOG_WRN, "AUBIO WARNING: " __VA_ARGS__)
     187#else
     188#define AUBIO_ERR(format, args...)   aubio_log(stderr, "AUBIO ERROR: " format , ##args)
     189#define AUBIO_MSG(format, args...)   aubio_log(stdout, format , ##args)
     190#define AUBIO_DBG(format, args...)   aubio_log(stderr, format , ##args)
     191#define AUBIO_WRN(format, args...)   aubio_log(stderr, "AUBIO WARNING: " format, ##args)
    185192#endif
    186193
Note: See TracChangeset for help on using the changeset viewer.