question

Upvotes
Accepted
25 0 1 3

Error Callback from OmmConsumerImpl : loggerMsg?

Hi I need to get a error call back whenever a RDMLogin failed. I'm getting logging from c.t.ema.access.OmmConsumerImpl of something like below and I wonder if it is possible that i can write a custom call back for this loggerMsg error?

2019-08-08 16:30:48.935 ERROR 258072 --- [ Thread-19] c.t.ema.access.OmmConsumerImpl : loggerMsg ClientName: LoginCallbackClient Severity: Error Text: RDMLogin stream was closed with status message username jala usernameType 1

State: Closed/Suspect/User unknown to permissioning system, it could be DACS, AAA or EED - text: "jala, unknown to system." loggerMsgEnd

Thanks

elektronrefinitiv-realtimeelektron-sdkrrtema-apielektron-message-apilogging
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvote
Accepted
9.6k 10 6 7

Hello @jake.lu

You can register for login stream to get an error callback whenever a RDMLogin failed. The error is in a status message and come to onStatusMsg(..) method. The example source code can be found in:

  • example330__Login__Streaming in Elektron SDK Java package
  • 330__Login__Streaming in Elektron SDK C++ package

The example result from example330__Login__Streaming:

Received Status. Item Handle: 1 Closure: null 
Item Name: jala 
Service Name: <not set> 
Item State: Closed / Suspect / Not entitled / 'jala, unknown to system.' 
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thank you this works for me

Upvotes
56.2k 145 45 65

You can create a custom log handler to get log messages, as mentioned in this site.

Then, you can use the following code to register your custom log handler.

LogManager.getLogManager().reset();
Logger rootLogger = LogManager.getLogManager().getLogger("");
rootLogger.setLevel(Level.FINEST);
rootLogger.addHandler(new MyLogHandler());
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.