Please tell me how to change log output location

Not applicable

We use OPDK 4.17.01.

Please tell me about changing log file output location.

I tried the following, but the log output location was not changed.

1.Open the message-processor.properties file in an editor. If the file does not exist, create it:
> vi /opt/apigee/customer/application/message-processor.properties

2.Set the properties as desired:
conf/message-logging.properties+logging_log.root.dir=/opt/apigee/var/log/messages

3.Save your changes.

4.Make sure the properties file is owned by the 'apigee' user:
> chown apigee:apigee /opt/apigee/customer/application/message-processor.properties

5.Restart the Edge component:
> /opt/apigee/apigee-service/bin/apigee-service edge-message-processor restart

In the log when restarting MessageProcessor, the configuration file seems to be loaded correctly.

[root@APIGEE0002 log]# /opt/apigee/apigee-service/bin/apigee-service edge-messagee-processor restart
apigee-service: edge-message-processor: pid=3992
apigee-service: edge-message-processor: OK
apigee-service: edge-message-processor: OK
apigee-service: edge-message-processor: OK
apigee-service: edge-message-processor: OK
apigee-service: edge-message-processor: OK
apigee-service: edge-message-processor: OK
apigee-service: edge-message-processor: OK
apigee-service: edge-message-processor: OK
apigee-service: edge-message-processor: OK
apigee-service: edge-message-processor: OK
apigee-service: edge-message-processor: OK
apigee-service: edge-message-processor: OK
apigee-service: edge-message-processor: OK
apigee-service: edge-message-processor: OK
apigee-service: edge-message-processor: OK
apigee-service: edge-message-processor: Not running (DEAD)
apigee-service: edge-message-processor: OK
The file conf/message-logging.properties was changed
[InsertDelta, position: 13, lines: [logging_log.root.dir=/opt/apigee/var/log/messages]]
apigee-configutil: edge-message-processor: # OK
apigee-service: edge-message-processor: Not running (NO_LOCKFILE)
apigee-service: edge-message-processor: status=2, continuing
apigee-service: edge-message-processor: OK
apigee-service: edge-message-processor: edge-message-processor is running

Thanks.

Solved Solved
1 4 448
1 ACCEPTED SOLUTION

@Tomoya Kimura,

Initially I was thinking you wanted to change the default log location on Edge components. But later I noticed that you are trying to change the default log location for MessageLogging policy.

I had a relook at the steps used by you and observed that in the step #2, you are using the incorrect property logging_log.root.dir instead of log.root.dir

In the step #2 add the following line to /opt/apigee/customer/application/message-processor.properties

conf/message-logging.properties+log.root.dir=/opt/apigee/var/log/messages

Repeat the rest of the steps as it is. This should ensure that the log files get created via MessageLogging policy will be in the folder specified through the property log.root.dir

View solution in original post

4 REPLIES 4

Not applicable

Please advise because it is not solved.

@Tomoya Kimura ,

You can change the default log location on Private Cloud setup 4.17.01 by following the instructions given in Setting log file location

@Tomoya Kimura,

Initially I was thinking you wanted to change the default log location on Edge components. But later I noticed that you are trying to change the default log location for MessageLogging policy.

I had a relook at the steps used by you and observed that in the step #2, you are using the incorrect property logging_log.root.dir instead of log.root.dir

In the step #2 add the following line to /opt/apigee/customer/application/message-processor.properties

conf/message-logging.properties+log.root.dir=/opt/apigee/var/log/messages

Repeat the rest of the steps as it is. This should ensure that the log files get created via MessageLogging policy will be in the folder specified through the property log.root.dir

Hi Amar,

I was able to change it.
Thank you very much.