Changeset fead41a for tests/src/utils
- Timestamp:
- Jan 8, 2017, 3:19:02 PM (8 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, sampler, yinfft+
- Children:
- 59fe157
- Parents:
- 32da451
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/src/utils/test-log.c
r32da451 rfead41a 10 10 void logging(int level, const char_t *message, void *data) { 11 11 FILE *out; 12 fprintf(stdout, "using custom logging function\n");12 //fprintf(stdout, "using custom logging function\n"); 13 13 if (level == AUBIO_LOG_ERR) { 14 14 out = stderr; … … 33 33 fprintf(stdout, "### testing with one custom function\n"); 34 34 aubio_log_set_function(logging, (void *)hdr); 35 AUBIO_ERR("testing recustomAUBIO_LOG_ERR\n");36 AUBIO_INF("testing recustomAUBIO_LOG_INF\n");37 AUBIO_WRN("testing recustomAUBIO_LOG_WRN\n");38 AUBIO_MSG("testing recustomAUBIO_LOG_MSG\n");39 AUBIO_DBG("testing recustomAUBIO_LOG_DBG\n");35 AUBIO_ERR("testing custom set_function AUBIO_LOG_ERR\n"); 36 AUBIO_INF("testing custom set_function AUBIO_LOG_INF\n"); 37 AUBIO_WRN("testing custom set_function AUBIO_LOG_WRN\n"); 38 AUBIO_MSG("testing custom set_function AUBIO_LOG_MSG\n"); 39 AUBIO_DBG("testing custom set_function AUBIO_LOG_DBG\n"); 40 40 41 41 fprintf(stdout, "### testing resetted logging\n"); 42 42 aubio_log_reset(); 43 AUBIO_ERR("testing uncustomAUBIO_LOG_ERR\n");44 AUBIO_INF("testing uncustomAUBIO_LOG_INF\n");45 AUBIO_WRN("testing uncustomAUBIO_LOG_WRN\n");46 AUBIO_MSG("testing uncustomAUBIO_LOG_MSG\n");47 AUBIO_DBG("testing uncustomAUBIO_LOG_DBG\n");43 AUBIO_ERR("testing again normal AUBIO_LOG_ERR\n"); 44 AUBIO_INF("testing again normal AUBIO_LOG_INF\n"); 45 AUBIO_WRN("testing again normal AUBIO_LOG_WRN\n"); 46 AUBIO_MSG("testing again normal AUBIO_LOG_MSG\n"); 47 AUBIO_DBG("testing again normal AUBIO_LOG_DBG\n"); 48 48 49 49 fprintf(stdout, "### testing per level customization\n"); … … 51 51 aubio_log_set_level_function(AUBIO_LOG_WRN, logging, NULL); 52 52 aubio_log_set_level_function(AUBIO_LOG_MSG, logging, (void *)hdr); 53 AUBIO_ERR("testing custom AUBIO_LOG_ERR\n");54 AUBIO_INF("testing customAUBIO_LOG_INF\n");55 AUBIO_WRN("testing custom AUBIO_LOG_WRN with data=NULL\n");56 AUBIO_MSG("testing custom AUBIO_LOG_MSG\n");57 AUBIO_DBG("testing uncustomizedAUBIO_LOG_DBG\n");53 AUBIO_ERR("testing custom set_level_function AUBIO_LOG_ERR\n"); 54 AUBIO_INF("testing again normal AUBIO_LOG_INF\n"); 55 AUBIO_WRN("testing custom set_level_function AUBIO_LOG_WRN with data=NULL\n"); 56 AUBIO_MSG("testing custom set_level_function AUBIO_LOG_MSG\n"); 57 AUBIO_DBG("testing again normal AUBIO_LOG_DBG\n"); 58 58 59 59 return 0;
Note: See TracChangeset
for help on using the changeset viewer.