test_aux_spec.c 468 B

123456789101112131415161718192021
  1. #include <zf_log.c>
  2. #include <zf_test.h>
  3. static const zf_log_spec g_spec =
  4. {
  5. ZF_LOG_GLOBAL_FORMAT,
  6. ZF_LOG_GLOBAL_OUTPUT
  7. };
  8. static void mock_output_callback(const zf_log_message *msg, void *arg)
  9. {
  10. (void)msg; (void)arg;
  11. }
  12. int main(int argc, char *argv[])
  13. {
  14. zf_log_set_output_v(ZF_LOG_PUT_STD, 0, mock_output_callback);
  15. ZF_LOGI_AUX(&g_spec, "aux log, argc=%i", argc);
  16. ZF_LOGI_MEM_AUX(&g_spec, argv, argc * sizeof(*argv), "aux log, argv pointers:");
  17. return 0;
  18. }