How to disable Apache http debug logs appearing in the TIBCO BusinessEvents (BE) logs.

How to disable Apache http debug logs appearing in the TIBCO BusinessEvents (BE) logs.

book

Article ID: KB0083801

calendar_today

Updated On:

Products Versions
TIBCO BusinessEvents Enterprise Edition 5.x

Description

TIBCO BusinessEvents engine logs have additional Apache HTTP debug logs.

-----Sample HTTP debug logs----

2016 Nov 30 08:36:17:612 GMT -8 audittrailagent-1 Debug [HttpRequest] - [org.apache.http.wire]  >> "_ns_: www.tibco.com/be/ontology/Events/Elastic/DocumentAPI[\r][\n]"
2016 Nov 30 08:36:17:612 GMT -8 audittrailagent-1 Debug [HttpRequest] - [org.apache.http.wire]  >> "content-type: application/json; charset=UTF-8[\r][\n]"
2016 Nov 30 08:36:17:612 GMT -8 audittrailagent-1 Debug [HttpRequest] - [org.apache.http.wire]  >> "_nm_: DocumentAPI[\r][\n]"
2016 Nov 30 08:36:17:612 GMT -8 audittrailagent-1 Debug [HttpRequest] - [org.apache.http.wire]  >> "Content-Length: 387[\r][\n]"
2016 Nov 30 08:36:17:612 GMT -8 audittrailagent-1 Debug [HttpRequest] - [org.apache.http.wire]  >> "Host: tib-bev-002-lp.domestic.com:3602[\r][\n]"
2016 Nov 30 08:36:17:612 GMT -8 audittrailagent-1 Debug [HttpRequest] - [org.apache.http.wire]  >> "Connection: Keep-Alive[\r][\n]"
2016 Nov 30 08:36:17:612 GMT -8 audittrailagent-1 Debug [HttpRequest] - [org.apache.http.wire]  >> "Expect: 100-continue[\r][\n]"
2016 Nov 30 08:36:17:613 GMT -8 audittrailagent-1 Debug [HttpRequest] - [org.apache.http.wire]  >> "[\r][\n]"
2016 Nov 30 08:36:17:613 GMT -8 audittrailagent-1 Debug [HttpRequest] - [org.apache.http.headers] >> POST /datagrid/Message/1646587845?parent=1480518547012-5824763-INV_POS-POSInterfaces-tib-bwx-004-lp.domestic.com HTTP/1.1
2016 Nov 30 08:36:17:613 GMT -8 audittrailagent-1 Debug [HttpRequest] - [org.apache.http.headers] >> _ns_: www.tibco.com/be/ontology/Events/Elastic/DocumentAPI
2016 Nov 30 08:36:17:613 GMT -8 audittrailagent-1 Debug [HttpRequest] - [org.apache.http.headers] >> content-type: application/json; charset=UTF-8
2016 Nov 30 08:36:17:613 GMT -8 audittrailagent-1 Debug [HttpRequest] - [org.apache.http.headers] >> _nm_: DocumentAPI
2016 Nov 30 08:36:17:613 GMT -8 audittrailagent-1 Debug [HttpRequest] - [org.apache.http.headers] >> Content-Length: 387
2016 Nov 30 08:36:17:613 GMT -8 audittrailagent-1 Debug [HttpRequest] - [org.apache.http.headers] >> Host: tib-bev-002-lp.domestic.com:3602
2016 Nov 30 08:36:17:613 GMT -8 audittrailagent-1 Debug [HttpRequest] - [org.apache.http.headers] >> Connection: Keep-Alive
2016 Nov 30 08:36:17:613 GMT -8 audittrailagent-1 Debug [HttpRequest] - [org.apache.http.headers] >> Expect: 100-continue
2016 Nov 30 08:36:17:613 GMT -8 audittrailagent-1 Debug [HttpRequest] - [org.apache.http.wire]  << "HTTP/1.1 100 Continue[\r][\n]"
2016 Nov 30 08:36:17:613 GMT -8 audittrailagent-1 Debug [HttpRequest] - [org.apache.http.wire]  << "[\r][\n]"
2016 Nov 30 08:36:17:614 GMT -8 audittrailagent-1 Debug [HttpRequest] - [org.apache.http.impl.conn.DefaultClientConnection] Receiving response: HTTP/1.1 100 Continue
--------

Issue/Introduction

How to disable Apache HTTP debug logs appearing in the BE logs.

Environment

TIBCO BusinessEvents 5.x All Operating Systems

Resolution

The Apache HTTP debug logs are seen in the engine logs because the "Send to Terminal" option in the CDD file has been enabled. Disable the "Send to Terminal" check box.

Here is the path.
CDD -->Collections tab -->Log-Configurations -->(inference-logConfig and cache-logConfig) -->Send to Terminal  -->Uncheck the box.

Here's another way where we suppress just the Apache HTTP Client logs while keeping the "send to terminal" option enabled. Add the following two lines of code in the startup function. This should prevent the Apache logs from showing up and will not interfere with any of the custom logging.

----
// disable Apache Http Client logs
Object logger = Log.getLogger("org.apache.http");
Log.setLevel(logger, "off");
-----