question

Upvotes
Accepted
37 1 1 6

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 5.0 MiB each and 10.0 MiB total.

typo, emaLog_pid.log

1 Answer

Upvotes
Accepted
20.3k 73 10 20

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 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea