/* build a log line for the session and an optional stream */
size_t sess_build_logline_orig(struct session *sess, struct stream *s, char *dst, size_t maxsize,
- struct lf_expr *lf_expr, struct log_orig orig);
+ const struct lf_expr *lf_expr, struct log_orig orig);
/* wrapper for sess_build_logline_orig(), uses LOG_ORIG_UNSPEC log origin */
static inline size_t sess_build_logline(struct session *sess, struct stream *s, char *dst, size_t maxsize,
- struct lf_expr *lf_expr)
+ const struct lf_expr *lf_expr)
{
return sess_build_logline_orig(sess, s, dst, maxsize, lf_expr,
log_orig(LOG_ORIG_UNSPEC, LOG_ORIG_FL_NONE));
* Builds a log line for the stream (must be valid).
*/
static inline size_t build_logline_orig(struct stream *s, char *dst, size_t maxsize,
- struct lf_expr *lf_expr, struct log_orig orig)
+ const struct lf_expr *lf_expr, struct log_orig orig)
{
return sess_build_logline_orig(strm_sess(s), s, dst, maxsize, lf_expr, orig);
}
/*
* Wrapper for build_logline_orig, uses LOG_ORIG_UNSPEC log origin
*/
-static inline size_t build_logline(struct stream *s, char *dst, size_t maxsize, struct lf_expr *lf_expr)
+static inline size_t build_logline(struct stream *s, char *dst, size_t maxsize, const struct lf_expr *lf_expr)
{
return build_logline_orig(s, dst, maxsize, lf_expr,
log_orig(LOG_ORIG_UNSPEC, LOG_ORIG_FL_NONE));
* stream is NULL, default values will be assumed for the stream part.
*/
size_t sess_build_logline_orig(struct session *sess, struct stream *s,
- char *dst, size_t maxsize, struct lf_expr *lf_expr,
+ char *dst, size_t maxsize, const struct lf_expr *lf_expr,
struct log_orig log_orig)
{
struct lf_buildctx _ctx = {};
struct http_txn *txn;
const struct strm_logs *logs;
struct connection *fe_conn, *be_conn;
- struct list *list_format = &lf_expr->nodes.list;
+ const struct list *list_format = &lf_expr->nodes.list;
unsigned int s_flags;
unsigned int uniq_id;
struct buffer chunk;