Changeset 41b985f for tests/src/utils/test-log.c
- Timestamp:
- Mar 12, 2017, 11:26:24 AM (8 years ago)
- Branches:
- sampler
- Children:
- bde49c4a
- Parents:
- 71f2e5f (diff), 67b6618 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/src/utils/test-log.c
r71f2e5f r41b985f 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; … … 26 26 fprintf(stdout, "### testing normal logging\n"); 27 27 AUBIO_ERR("testing normal AUBIO_LOG_ERR\n"); 28 AUBIO_INF("testing normal AUBIO_LOG_INF\n"); 28 29 AUBIO_WRN("testing normal AUBIO_LOG_WRN\n"); 29 30 AUBIO_MSG("testing normal AUBIO_LOG_MSG\n"); … … 32 33 fprintf(stdout, "### testing with one custom function\n"); 33 34 aubio_log_set_function(logging, (void *)hdr); 34 AUBIO_ERR("testing recustom AUBIO_LOG_ERR\n"); 35 AUBIO_WRN("testing recustom AUBIO_LOG_WRN\n"); 36 AUBIO_MSG("testing recustom AUBIO_LOG_MSG\n"); 37 AUBIO_DBG("testing recustom AUBIO_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"); 38 40 39 41 fprintf(stdout, "### testing resetted logging\n"); 40 42 aubio_log_reset(); 41 AUBIO_ERR("testing uncustom AUBIO_LOG_ERR\n"); 42 AUBIO_WRN("testing uncustom AUBIO_LOG_WRN\n"); 43 AUBIO_MSG("testing uncustom AUBIO_LOG_MSG\n"); 44 AUBIO_DBG("testing uncustom AUBIO_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"); 45 48 46 49 fprintf(stdout, "### testing per level customization\n"); … … 48 51 aubio_log_set_level_function(AUBIO_LOG_WRN, logging, NULL); 49 52 aubio_log_set_level_function(AUBIO_LOG_MSG, logging, (void *)hdr); 50 AUBIO_ERR("testing custom AUBIO_LOG_ERR\n"); 51 AUBIO_WRN("testing custom AUBIO_LOG_WRN with data=NULL\n"); 52 AUBIO_MSG("testing custom AUBIO_LOG_MSG\n"); 53 AUBIO_DBG("testing uncustomized AUBIO_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"); 54 58 55 59 return 0;
Note: See TracChangeset
for help on using the changeset viewer.