question

Upvotes
Accepted
43 7 12 12

Is possible to change Logger Severity during execution?

It is possible to change Logger level of EMA, for example from LoggerSeverity::Success to LoggerSeverity::Warning, programmatically during execution?

Suppose that I have, when the EMA Consumer start, the logger configurated in the EmaConfig.xml as below:

LoggerSeverity value="LoggerSeverity::Success"/>

Can be changed after the start?

Thank you.

elektronrefinitiv-realtimeelektron-sdkema-apirrtelektron-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.

Upvotes
Accepted
25.3k 87 12 25

Hi @cdefusco

Just to add to my colleague's comments above...

As you may be aware the OmmConsumer represents a session with the server and during the initalisation it performs login, establishes a connection and downloads dictionary etc.

This means that when you destroy the existing OmmConsumer before creating the new one, you will be logged out and disconnected etc.

Be aware of the above - if your intention behind changing the logger severity dynamically was for diagnostic purposes - as changing the LoggerSeverity using the above technique would mean essentially re-initializing your session with the server.

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.

Upvotes
78.1k 246 52 72

@cdefusco

From my finding, the application needs to assign an instance of OMMConsumerConfig when creating an instance of OMMConsumer. The OMMConsumer doesn't provide an interface to access the configuration. Therefore, the application is unable to change the loaded configurations.

Therefore, if you need to change the configurations, you need to create a new instance of OMMConsumer with the new configurations.

However, this is a nice feature so you can submit this feedback to the product team via Get Support.

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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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