Repository: ambari Updated Branches: refs/heads/trunk accc96dba -> bb87fe175
AMBARI-17157. Storm 1.0 log4j config update (Sriharsha Chintalapani via alejandro) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bb87fe17 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bb87fe17 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bb87fe17 Branch: refs/heads/trunk Commit: bb87fe175aedb7c8eb6400a15b230abfae55da9d Parents: accc96d Author: Alejandro Fernandez <[email protected]> Authored: Mon Jun 13 13:49:38 2016 -0700 Committer: Alejandro Fernandez <[email protected]> Committed: Mon Jun 13 13:49:38 2016 -0700 ---------------------------------------------------------------------- .../1.0.1/configuration/storm-cluster-log4j.xml | 111 ++++++++++++++++ .../1.0.1/configuration/storm-worker-log4j.xml | 126 +++++++++++++++++++ 2 files changed, 237 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/bb87fe17/ambari-server/src/main/resources/common-services/STORM/1.0.1/configuration/storm-cluster-log4j.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/STORM/1.0.1/configuration/storm-cluster-log4j.xml b/ambari-server/src/main/resources/common-services/STORM/1.0.1/configuration/storm-cluster-log4j.xml new file mode 100644 index 0000000..1709f0d --- /dev/null +++ b/ambari-server/src/main/resources/common-services/STORM/1.0.1/configuration/storm-cluster-log4j.xml @@ -0,0 +1,111 @@ +<?xml version="1.0"?> +<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> +<!-- +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +--> +<configuration supports_final="false" supports_adding_forbidden="true"> + <property> + <name>content</name> + <display-name>storm-cluster-log4j template</display-name> + <description>Custom cluster.xml</description> + <value><![CDATA[ +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<configuration monitorInterval="60"> +<properties> + <property name="pattern">%d{yyyy-MM-dd HH:mm:ss.SSS} %c{1.} [%p] %msg%n</property> +</properties> +<appenders> + <RollingFile name="A1" immediateFlush="false" + fileName="${sys:storm.log.dir}/${sys:logfile.name}" + filePattern="${sys:storm.log.dir}/${sys:logfile.name}.%i.gz"> + <PatternLayout> + <pattern>${pattern}</pattern> + </PatternLayout> + <Policies> + <SizeBasedTriggeringPolicy size="100 MB"/> <!-- Or every 100 MB --> + </Policies> + <DefaultRolloverStrategy max="9"/> + </RollingFile> + <RollingFile name="WEB-ACCESS" immediateFlush="false" + fileName="${sys:storm.log.dir}/access-web-${sys:daemon.name}.log" + filePattern="${sys:storm.log.dir}/access-web-${sys:daemon.name}.log.%i.gz"> + <PatternLayout> + <pattern>${pattern}</pattern> + </PatternLayout> + <Policies> + <SizeBasedTriggeringPolicy size="100 MB"/> <!-- Or every 100 MB --> + </Policies> + <DefaultRolloverStrategy max="9"/> + </RollingFile> + <RollingFile name="THRIFT-ACCESS" immediateFlush="false" + fileName="${sys:storm.log.dir}/access-${sys:logfile.name}" + filePattern="${sys:storm.log.dir}/access-${sys:logfile.name}.%i.gz"> + <PatternLayout> + <pattern>${pattern}</pattern> + </PatternLayout> + <Policies> + <SizeBasedTriggeringPolicy size="100 MB"/> <!-- Or every 100 MB --> + </Policies> + <DefaultRolloverStrategy max="9"/> + </RollingFile> + <Syslog name="syslog" format="RFC5424" charset="UTF-8" host="localhost" port="514" + protocol="UDP" appName="[${sys:daemon.name}]" mdcId="mdc" includeMDC="true" + facility="LOCAL5" enterpriseNumber="18060" newLine="true" exceptionPattern="%rEx{full}" + messageId="[${sys:user.name}:S0]" id="storm" immediateFlush="true" immediateFail="true"/> +</appenders> +<loggers> + + <Logger name="org.apache.storm.logging.filters.AccessLoggingFilter" level="info" additivity="false"> + <AppenderRef ref="WEB-ACCESS"/> + <AppenderRef ref="syslog"/> + </Logger> + <Logger name="org.apache.storm.logging.ThriftAccessLogger" level="info" additivity="false"> + <AppenderRef ref="THRIFT-ACCESS"/> + <AppenderRef ref="syslog"/> + </Logger> + <root level="info"> <!-- We log everything --> + <appender-ref ref="A1"/> + <appender-ref ref="syslog"/> + </root> +</loggers> +</configuration> + + ]]></value> + <value-attributes> + <type>content</type> + <show-property-name>false</show-property-name> + </value-attributes> + <on-ambari-upgrade add="true"/> + </property> +</configuration> http://git-wip-us.apache.org/repos/asf/ambari/blob/bb87fe17/ambari-server/src/main/resources/common-services/STORM/1.0.1/configuration/storm-worker-log4j.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/STORM/1.0.1/configuration/storm-worker-log4j.xml b/ambari-server/src/main/resources/common-services/STORM/1.0.1/configuration/storm-worker-log4j.xml new file mode 100644 index 0000000..a1029a2 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/STORM/1.0.1/configuration/storm-worker-log4j.xml @@ -0,0 +1,126 @@ +<?xml version="1.0"?> +<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> +<!-- +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +--> +<configuration supports_final="false" supports_adding_forbidden="true"> + <property> + <name>content</name> + <display-name>storm-worker-log4j template</display-name> + <description>Custom worker.xml</description> + <value><![CDATA[ +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<configuration monitorInterval="60"> +<properties> + <property name="pattern">%d{yyyy-MM-dd HH:mm:ss.SSS} %c{1.} [%p] %msg%n</property> + <property name="patternNoTime">%msg%n</property> + <property name="patternMetrics">%d %-8r %m%n</property> +</properties> +<appenders> + <RollingFile name="A1" + fileName="${sys:workers.artifacts}/${sys:storm.id}/${sys:worker.port}/${sys:logfile.name}" + filePattern="${sys:workers.artifacts}/${sys:storm.id}/${sys:worker.port}/${sys:logfile.name}.%i.gz"> + <PatternLayout> + <pattern>${pattern}</pattern> + </PatternLayout> + <Policies> + <SizeBasedTriggeringPolicy size="100 MB"/> <!-- Or every 100 MB --> + </Policies> + <DefaultRolloverStrategy max="9"/> + </RollingFile> + <RollingFile name="STDOUT" + fileName="${sys:workers.artifacts}/${sys:storm.id}/${sys:worker.port}/${sys:logfile.name}.out" + filePattern="${sys:workers.artifacts}/${sys:storm.id}/${sys:worker.port}/${sys:logfile.name}.out.%i.gz"> + <PatternLayout> + <pattern>${patternNoTime}</pattern> + </PatternLayout> + <Policies> + <SizeBasedTriggeringPolicy size="100 MB"/> <!-- Or every 100 MB --> + </Policies> + <DefaultRolloverStrategy max="4"/> + </RollingFile> + <RollingFile name="STDERR" + fileName="${sys:workers.artifacts}/${sys:storm.id}/${sys:worker.port}/${sys:logfile.name}.err" + filePattern="${sys:workers.artifacts}/${sys:storm.id}/${sys:worker.port}/${sys:logfile.name}.err.%i.gz"> + <PatternLayout> + <pattern>${patternNoTime}</pattern> + </PatternLayout> + <Policies> + <SizeBasedTriggeringPolicy size="100 MB"/> <!-- Or every 100 MB --> + </Policies> + <DefaultRolloverStrategy max="4"/> + </RollingFile> + <RollingFile name="METRICS" + fileName="${sys:workers.artifacts}/${sys:storm.id}/${sys:worker.port}/${sys:logfile.name}.metrics" + filePattern="${sys:workers.artifacts}/${sys:storm.id}/${sys:worker.port}/${sys:logfile.name}.metrics.%i.gz"> + <PatternLayout> + <pattern>${patternMetrics}</pattern> + </PatternLayout> + <Policies> + <SizeBasedTriggeringPolicy size="2 MB"/> + </Policies> + <DefaultRolloverStrategy max="9"/> + </RollingFile> + <Syslog name="syslog" format="RFC5424" charset="UTF-8" host="localhost" port="514" + protocol="UDP" appName="[${sys:storm.id}:${sys:worker.port}]" mdcId="mdc" includeMDC="true" + facility="LOCAL5" enterpriseNumber="18060" newLine="true" exceptionPattern="%rEx{full}" + messageId="[${sys:user.name}:${sys:logging.sensitivity}]" id="storm" immediateFail="true" immediateFlush="true"/> +</appenders> +<loggers> + <root level="info"> <!-- We log everything --> + <appender-ref ref="A1"/> + <appender-ref ref="syslog"/> + </root> + <Logger name="org.apache.storm.metric.LoggingMetricsConsumer" level="info" additivity="false"> + <appender-ref ref="METRICS"/> + </Logger> + <Logger name="STDERR" level="INFO"> + <appender-ref ref="STDERR"/> + <appender-ref ref="syslog"/> + </Logger> + <Logger name="STDOUT" level="INFO"> + <appender-ref ref="STDOUT"/> + <appender-ref ref="syslog"/> + </Logger> +</loggers> +</configuration> + ]]></value> + <value-attributes> + <type>content</type> + <show-property-name>false</show-property-name> + </value-attributes> + <on-ambari-upgrade add="true"/> + </property> +</configuration>
