question

Upvotes
Accepted
33 9 13 29

EMA C++: set the absolute path/relative path for EmaLog_pid.log

Can we set the absolute path/relative path/base dir for the Ema log file EmaLog_pid.log?

ema-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.

typo, emaLog_pid.log

1 Answer

· Write an Answer
Upvotes
Accepted
25.3k 87 12 25

Hi @Frederic

This can be specified using normal EMA Configuration parameters i.e. EMAConfig.xml or programmatic config, using the Logger Group entry Parameters - please refer to the EMAConfigGuide PDF file for full details.

For example, if using a config file - in your Consumer config, you specify a Logger entry name

<ConsumerGroup>
  <ConsumerList>
    <Consumer>
        <Name value="Consumer_1"/>
        <Channel value="Channel_1"/>
        <Logger value="Logger_2"/>
        <Dictionary value="Dictionary_1"/>
        <XmlTraceToStdout value="0"/>
    </Consumer>
  </ConsumerList>
</ConsumerGroup>

Then you configure the Logger_2 config as required e.g.

<LoggerGroup>
    <LoggerList>
        <Logger>
            <Name value="Logger_2"/>
            <LoggerType value="LoggerType::File"/>
            <FileName value="c:/temp/myEmaLog.log"/>
            <LoggerSeverity value="LoggerSeverity::Success"/>
        </Logger>
    </LoggerList>
</LoggerGroup>



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.