question

Upvotes
Accepted
35 3 3 9

How to limit the number of generated logs in EMA?

Hi,

when using the EMA (C++) Library for a server application, it is normally useful to enable the logs generation to file with standard level for the consumer(s) and provider(s) used.

However, the generated logs are always in the form <FileName>_pid.log (default: “emaLog_pid.log”).

With time, this causes the generation of several logs in the application's working directory (one for each instance of the application). Suppose for instance an application restarted on a daily basis..

Is there in EMA any rolling mechanism that allows to control the number of generated logs?

Thanks

Best Regards,

Paolo

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

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

Upvotes
Accepted
20.3k 73 10 20

Hi @Paolo Parlapiano

In that case, I recommend you log a change request as an Issue on the Github page for the Elektron SDK - asking the development team to add more control over the Log file creation.


icon clock
10 |1500

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

Upvotes
20.3k 73 10 20

Hi @Paolo Parlapiano

The logging related parameters are covered in section 3.5 of the EMACPP_ConfigGuide which is also included in PDF form with the Elektron SDK.

As you will note there is a FileName parameter which allows you to override the default 'emaLog_pid.log'

If you need to vary the filename programmatically you can use the Programmatic Config functionality demonstrated in example 421__MarketPrice__ProgrammaticConfig.

Programmatic Config is also described in section 4.5 of the above config guide.

icon clock
10 |1500

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

Upvotes
35 3 3 9

Hi @Umer Nalla,


if I override the FileName parameter, the final result is anyway myFileName_pid.log, which doesn't resolve the issue.


Thanks

Regards,

Paolo

icon clock
10 |1500

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

Click below to post an Idea Post Idea