diff --git a/doc/SPOE.txt b/doc/SPOE.txt index 9583d6941..016590e3f 100644 --- a/doc/SPOE.txt +++ b/doc/SPOE.txt @@ -1197,7 +1197,8 @@ SPOE. Depending on the status code, the log level will be different. In the normal case, when no error occurred, the message is logged with the level LOG_NOTICE. Otherwise, the message is logged with the level LOG_WARNING. -The messages are logged using the stream's logger and use the following format: +The messages are logged using the agent's logger, if defined, and use the +following format: SPOE: [AGENT] sid=STREAM-ID st=STATUC-CODE reqT/qT/wT/resT/pT diff --git a/src/flt_spoe.c b/src/flt_spoe.c index abd96cc91..3b425cc3c 100644 --- a/src/flt_spoe.c +++ b/src/flt_spoe.c @@ -2052,7 +2052,7 @@ spoe_queue_context(struct spoe_context *ctx) " - failed to create SPOE appctx\n", (int)now.tv_sec, (int)now.tv_usec, agent->id, __FUNCTION__, ctx->strm); - send_log(ctx->strm->be, LOG_EMERG, + send_log(&conf->agent_fe, LOG_EMERG, "SPOE: [%s] failed to create SPOE applet\n", agent->id); @@ -2717,7 +2717,7 @@ spoe_process_group(struct stream *s, struct spoe_context *ctx, __FUNCTION__, s, s->uniq_id, ctx->status_code, ctx->stats.t_request, ctx->stats.t_queue, ctx->stats.t_waiting, ctx->stats.t_response, ctx->stats.t_process); - send_log(s->be, (!ctx->status_code ? LOG_NOTICE : LOG_WARNING), + send_log(&conf->agent_fe, (!ctx->status_code ? LOG_NOTICE : LOG_WARNING), "SPOE: [%s] sid=%u st=%u %ld/%ld/%ld/%ld/%ld\n", agent->id, group->id, s->uniq_id, ctx->status_code, ctx->stats.t_request, ctx->stats.t_queue, ctx->stats.t_waiting, @@ -2755,7 +2755,7 @@ spoe_process_event(struct stream *s, struct spoe_context *ctx, __FUNCTION__, s, spoe_event_str[ev], s->uniq_id, ctx->status_code, ctx->stats.t_request, ctx->stats.t_queue, ctx->stats.t_waiting, ctx->stats.t_response, ctx->stats.t_process); - send_log(s->be, (!ctx->status_code ? LOG_NOTICE : LOG_WARNING), + send_log(&conf->agent_fe, (!ctx->status_code ? LOG_NOTICE : LOG_WARNING), "SPOE: [%s] sid=%u st=%u %ld/%ld/%ld/%ld/%ld\n", agent->id, spoe_event_str[ev], s->uniq_id, ctx->status_code, ctx->stats.t_request, ctx->stats.t_queue, ctx->stats.t_waiting, @@ -3047,7 +3047,7 @@ spoe_start(struct stream *s, struct filter *filter) " - failed to create SPOE context\n", (int)now.tv_sec, (int)now.tv_usec, agent->id, __FUNCTION__, s); - send_log(s->be, LOG_EMERG, + send_log(&conf->agent_fe, LOG_EMERG, "SPOE: [%s] failed to create SPOE context\n", agent->id); return 0;