Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/api/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Api 能否在主机和端口的消息日志策略中使用变量?_Api_Apigee - Fatal编程技术网

Api 能否在主机和端口的消息日志策略中使用变量?

Api 能否在主机和端口的消息日志策略中使用变量?,api,apigee,Api,Apigee,能否在主机和端口的消息日志策略中使用变量?比如说 <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <MessageLogging async="false" continueOnError="false" enabled="true" name="splunk"> <Syslog> <Message>Message. id = {request.header.id}</Messa

能否在主机和端口的消息日志策略中使用变量?比如说

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<MessageLogging async="false" continueOnError="false" enabled="true" name="splunk">
<Syslog>
<Message>Message. id = {request.header.id}</Message>
<Host>{variable}</Host>
<Port>{variable}</Port>
</Syslog>
</MessageLogging>

消息id={request.header.id}
{variable}
{variable}

此时,主机和端口项不能是变量。

在运行时使用变量的替代方法是在构建时使用maven等构建工具设置这些属性