Skip to content

Commit 0073f5b

Browse files
committed
libschedutil: use f58 for jobids in log messages
Problem: libschedutil logs jobids in their decimal encoding, but jobids in this form aren't easily identifiable as jobids at first glance and take up more space in most cases. Update libschedutil to log jobids as f58.
1 parent 98e2b16 commit 0073f5b

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/common/libschedutil/hello.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <flux/core.h>
1515
#include <jansson.h>
1616

17+
#include "src/common/libjob/idf58.h"
1718
#include "schedutil_private.h"
1819
#include "init.h"
1920
#include "hello.h"
@@ -25,14 +26,14 @@ static void raise_exception (flux_t *h, flux_jobid_t id, const char *note)
2526

2627
flux_log (h,
2728
LOG_INFO,
28-
"raising fatal exception on running job id=%ju",
29-
(uintmax_t)id);
29+
"raising fatal exception on running job id=%s",
30+
idf58 (id));
3031

3132
if (!(f = flux_job_raise (h, id, "scheduler-restart", 0, note))
3233
|| flux_future_get (f, NULL) < 0) {
3334
flux_log_error (h,
34-
"error raising fatal exception on %ju: %s",
35-
(uintmax_t)id,
35+
"error raising fatal exception on %s: %s",
36+
idf58 (id),
3637
future_strerror (f, errno));
3738
}
3839
flux_future_destroy (f);
@@ -64,8 +65,8 @@ static int schedutil_hello_job (schedutil_t *util,
6465
flux_future_destroy (f);
6566
return 0;
6667
error:
67-
flux_log_error (util->h, "hello: error loading R for id=%ju",
68-
(uintmax_t)id);
68+
flux_log_error (util->h, "hello: error loading R for id=%s",
69+
idf58 (id));
6970
flux_future_destroy (f);
7071
return -1;
7172
}

0 commit comments

Comments
 (0)