diff options
author | Thomas White <taw@physics.org> | 2023-06-03 20:27:49 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2023-06-03 20:27:49 +0200 |
commit | b5550e4399415fe4863057d6cbd406faf3f2df31 (patch) | |
tree | b96e7dfb22cb27d8272a21f155817f7eec257e3e /src | |
parent | 98fb6da2715390f11d0b99a872aa842cd6503d60 (diff) |
ASAP::O: Add verbose logging for hits-only stream
Caution: extreme console spam
Diffstat (limited to 'src')
-rw-r--r-- | src/im-asapo.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/im-asapo.c b/src/im-asapo.c index 7cc155bc..c34954e2 100644 --- a/src/im-asapo.c +++ b/src/im-asapo.c @@ -35,6 +35,7 @@ #include <stdint.h> #include <assert.h> #include <unistd.h> +#include <sys/time.h> #include <asapo/consumer_c.h> #include <asapo/producer_c.h> @@ -113,6 +114,8 @@ static int create_producer(struct im_asapo *a, struct im_asapo_params *params) return 1; } + asapo_producer_set_log_level(a->producer, Debug); + asapo_free_handle(&err); return 0; } @@ -294,6 +297,10 @@ static void send_real(struct im_asapo *a, struct image *image) 0, 0); /* Auto ID */ + struct timeval tv; + gettimeofday(&tv,NULL); + STATUS("sent %s at %lli . %lli\n", filename, tv.tv_sec, tv.tv_usec); + err = asapo_new_handle(); asapo_producer_send(a->producer, header, image->data_block, kDefaultIngestMode, a->stream, @@ -319,6 +326,10 @@ static void send_placeholder(struct im_asapo *a, struct image *image) snprintf(filename, 1024, "processed/%s_hits/%s-%i.placeholder", a->stream, a->stream, image->serial); + struct timeval tv; + gettimeofday(&tv,NULL); + STATUS("sent %s at %lli . %lli\n", filename, tv.tv_sec, tv.tv_usec); + header = asapo_create_message_header(image->serial, 8, /* strlen("SKIPPED"+\0) */ filename, |