Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Message logging file charset

Hello,

We are using message-logging policy in apigee OPDK, with File option for writing the log.

We noticed that in some of our MP servers (Linux servers) the log files encoding is us-ascii and in other servers the encoding is utf-8.

Since we are using Hebrew characters we must have the log files in utf-8 encoding.

How can we set the logger output file to utf-8 encoding?

 

Thanks!

0 7 939
7 REPLIES 7

Hey! We've received your inquiry and are currently reviewing it. We'll update you as soon as possible. Thanks for your patience.

Hi @kobilavi , sorry to hear you are experiencing difficulties.😢

A few things to try/verify:
1) Change the header of the policy to add the expected encoding like the example below:

<? xml version="1.0" encoding="UTF-8" standalone="yes"?>
You may might need to change also the syslog configuration; there is not a policy to write to file directly, see here, it goes over syslog to file.

2) Please check which version and type of syslogd or rsyslogd daemon the OS is using, this needs to be changed.

3) Also please check if the linux LOCALE settings are the same across the servers - they might be different and misconfigured.

Hope that helps 😁



 

Hello christopherkarl,

Thank you for your response,

I'm running an OPDK version on Linux machines and using file as the output method for the MessageLogging policy - therefore I don't this syslog is relevant.

The policy header is same as you wrote with the UTF-8 encoding setting, also the LOCALE settings are the same across all of our servers - but still l some of them can't write Hebrew characters.

 

Thanks,

Kobi Lavi.

Can you also confirm which MP RPM version you have on each of the servers ? You can find it by running:

apigee-all version

 

Kobi, Denis will connect with you and investigate further. He told me there are two different environments behaving differently, there are more configurations to check/compare.  

To close the loop, just learned that the issue was resolved by an MP process restart. 

Thank you for your response,

Yes the problem solved by simply restarting the MP,

but we still want to know how do apigee set the file encoding?

 

Thanks,

Kobi Lavi.