Skip to content

Commit

Permalink
libflux: hide internal log buffer size from public API
Browse files Browse the repository at this point in the history
Problem: libflux/flog.h exposes FLUX_MAX_LOGBUF via the public API,
but there are currently no users. Furthermore, the implementation
now falls back to a heap-allocated buffer if the internal fixed-size
buffer causes log message truncation, so exposing the internal buffer
size is misleading.

Move the definition of FLUX_MAX_LOGBUF out of the public API.
  • Loading branch information
grondo committed Jan 14, 2025
1 parent 318b9ba commit dbbf824
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/common/libflux/flog.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#include "src/common/libutil/wallclock.h"
#include "src/common/libutil/stdlog.h"

#define FLUX_MAX_LOGBUF 2048

typedef struct {
char appname[STDLOG_MAX_APPNAME + 1];
char procid[STDLOG_MAX_PROCID + 1];
Expand Down
3 changes: 0 additions & 3 deletions src/common/libflux/flog.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
extern "C" {
#endif


#define FLUX_MAX_LOGBUF 2048

typedef void (*flux_log_f)(const char *buf, int len, void *arg);

/* Set log appname for handle instance.
Expand Down

0 comments on commit dbbf824

Please sign in to comment.