RestComm / jain-slee

The World's #1 Open Source JAIN-SLEE (JSLEE) 1.1 Implementation
http://www.restcomm.com/
GNU Affero General Public License v3.0
24 stars 50 forks source link

[tracer] Rework Tracer facility for comfortable logging for huge count of SBB. #96

Closed SergeyLee closed 6 years ago

SergeyLee commented 7 years ago

Problem description:

Our sbbs are commonly using SLEE tracer for logging and we commonly trace the {{server.log}} for basic debugging etc. The problem are the weird logger names used for SBBs (ie javax.slee.SbbNotification[X] - where X is the sbb name) as we have a pretty extensive set of SBBs, setting them all to debug level becomes a real hazzard as we must set each and every SBB individually. Commonly the log4j category inheritance would allow for debug configuration for our entire package (eg. com.company.product) while this is impossible for our SLEE applications. Do you have a better solution for us?

duyanh030 commented 7 years ago

Hi Sergey

I did investigate about log4j, org.jboss.as.logging, wildfy logger . and have 1 question to ask you. Do you mean SLEE will support customer on start up time (staring wildfy) or during runtime?

Case 1: Starting time support only:In this case we just support customer to configure it at starting time only. +++ We could reuse " log4j category inheritance " as you mentioned it. At the start up time, slee-container create new log category by invoke "getLogger("javax.slee")"; +++ After that all new created ssb tracer will inherit log level from "javax.slee" +++ We could support customer to configure initial log level for "javax.slee" in standalone.xml file at .

Case 2: Runtime support. We provide 1 action - operation in jboss-cli.sh at subsystem=slee-container:change-all-sub-sbb-log_level(input by SbbID or Service ID or ALL). ++ Then slee-container could change all log4j containing SbbID or ServiceID. ++ By this solution we need to register new operation I think.

I am also thinking about question "is there any reason why SLEE use log4j instead of jboss logger?"

Please feel free to correct me if I am wrong. or my solution break the system design. :)

SergeyLee commented 7 years ago

Hi @duyanh030 Sorry for my late answer. I will review you comments ASAP.

duyanh030 commented 7 years ago

Hi @SergeyLee Did you take a look on my proposal? Just remind in case you missed it. :)

duyanh030 commented 7 years ago

I am thinking about we could support customer to configure loglevel for through slee console.

SergeyLee commented 7 years ago

Do you mean SLEE will support customer on start up time (staring wildfy) or during runtime?

We need to setup logging levels for all customer's SBB only on startup. By the way this probem was occurred with JSLEE on the JBoss 5.1. So we should to find solution for both JBoss 5.1 and WildFly.

deruelle commented 7 years ago

was a solution found for this ?

satanatoly commented 6 years ago

Logging for sbb-s can be configured by adding filter-spec in wildfly console in Configuration->Subsystems->Logging->Handler

For example filter-spec: all(not(match("SleeConnectivitySbb")), not(match("SipUASExampleSbb"))) will filter logging for two particular sbb-s Need to note that filters are applied to logged message content and not the Formatter prefix You can check this document for more customised usage