Logging events from every proxy to a custom file on message processor box

I am working on logging certain event messages from every proxy to a single file on message processor.

If i change message.properties file I am able to log using message logging policy, but other message logging policies file location got disturbed.

Is there any way or any policy in apigee to do this?

0 7 426
7 REPLIES 7

Not clear.

What change did you make in message.properties?

What do you mean by "disturbed" ?

@Dino-at-Google

if i change bin_setenv_data_dir, conf_message-logging_log.root.dir to my custom

location (/opt/apigee/var/log/oms/...) in message-logging.properties file, I am able to log

certain event messages to my custom location (/opt/apigee/var/log/oms/...) using message

logging policy.

But my other message logging policies (which are already in place) log file location got

disturbed (/opt/apigee/var/log/edge-message-processor/messagelogging/org_name/environment/api_proxy_name/revision/logging_policy_name/),

which means other message logging policy logs are also writing to custom

location (/opt/apigee/var/log/oms/...) which I don't want.

I want to log only specific event messages from all proxies to a file on

message processor box. Is this possible with Message-logging policy with

out changing the other message logging policies default location or is there

any other policy or any other way to do it?

Unfortunately I don't think what you're trying to do is possible with the file logging configuration of the MessageLogging policy.

My suggestion is to set up a syslog listener on a random localhost port on your MPs and log to that instead. The configuration of your syslog server (most distros ship with rsyslog installed by default) will allow you to configure which file(s) those messages go to.

@Dino-at-Google @Christian King

Apart from message logging policy, is there any other policy or any way to do this?

Well, the messagelogging policy is the one you want. Do you not like the suggestion of using MessageLogging with syslog? That should work for you.

I already implemented with syslog it is working fine. But my boss don't want to run rsyslog daemon in production on message processor.

So I am looking, is there any other way to do it

I don't know of another way to do it.