diff --git a/src/util/output.c b/src/util/output.c index 74ca111538..5c55594b6f 100644 --- a/src/util/output.c +++ b/src/util/output.c @@ -328,6 +328,13 @@ static int do_open(int output_id, lam_output_stream_t *lds) i = output_id; } + /* Special case: if we got NULL for lds, then just use the default + verbose */ + + if (NULL == lds) { + lds = &verbose; + } + /* Got a stream -- now initialize it and open relevant outputs */ info[i].ldi_used = true; diff --git a/src/util/output.h b/src/util/output.h index 04efa3cfc8..e638712faa 100644 --- a/src/util/output.h +++ b/src/util/output.h @@ -220,6 +220,9 @@ extern "C" { * using it in successive calls to LAM_OUTPUT(), lam_output(), * lam_output_switch(), and lam_output_close(). * + * If lds is NULL, the default descriptions will be used, meaning + * that output will only be sent to stderr. + * * It is safe to have multiple threads invoke this function * simultaneously; their execution will be serialized in an * unspecified manner.