When I use the Message Logging policy to send the logs to Loggly, the Loggly customer token is also getting saved in the logs. How can I hide this from the logs?
you forget to specify 5 “-” separated by space character as mentioned in my earlier post. Note that there is a space between “1” and first “-” as well as last “-” and “[”. These are required as specified in the RFC5424 (Ref section 6).
<14>Sun Aug 16 22:09:59 UTC 2015Info: <14>1 - - - - - [xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx@xxxxx] Hello World!
When I send the below data using curl, Loggly is properly hiding the customer token. But when I use the same data in Apigee message logging policy, the customer token is getting added to the logs.
Curl command for loggly works fine as now your message is RFC5424 compliant.
Latest log specified by you has "<14>Sun Aug 16 22:09:59 UTC 2015Info: " as prefix. Was it not coming in the earlier logs? This text is missing in the log contents specified earlier.
Try as below and let us know:
[xxxxx] HelloWorld!
Note: “xxxxx” are corresponding to yours Loggly private enterprise number.
Regarding second point, this prefix was there in earlier logs as well. Is this something that Apigee adding as header? If so, is this a RFC5424 compliant header?
Regarding third point, I don’t think the messages will get logged to my Loggly account without my customer token.
Apigee’s syslog policy adds the timestamp, so as @rdoda pointed out, all you need is [xxxxx] HelloWorld!, and you will see that loggly has received:
<14>Tue Aug 18 09:59:47 UTC 2015Info: [xxxxx] HelloWorld!
To answer your original question - I have been unable to hide the customer token from the logs, and am not sure it is possible when using Apigee’s Message Logging Policy.