ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gau...@apache.org
Subject incubator-ranger git commit: RANGER-887: Changes needed to convert log4j.xml to log4j.properties
Date Fri, 15 Apr 2016 06:05:07 GMT
Repository: incubator-ranger
Updated Branches:
  refs/heads/master dbd0bba9e -> 139bdf36a


RANGER-887: Changes needed to convert log4j.xml to log4j.properties

Signed-off-by: Gautam Borad <gautam@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/139bdf36
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/139bdf36
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/139bdf36

Branch: refs/heads/master
Commit: 139bdf36af4e3262e8b5cb4a45e0b804b95a8ab6
Parents: dbd0bba
Author: Mehul Parikh <mehul.parikh@freestoneinfotech.com>
Authored: Wed Mar 30 14:54:15 2016 +0530
Committer: Gautam Borad <gautam@apache.org>
Committed: Fri Apr 15 11:34:55 2016 +0530

----------------------------------------------------------------------
 .../src/main/webapp/WEB-INF/log4j.properties    | 74 ++++++++++++++++++++
 security-admin/src/main/webapp/WEB-INF/web.xml  |  2 +-
 tagsync/conf.dist/log4j.properties              | 33 +++++++++
 tagsync/scripts/ranger-tagsync-services.sh      |  2 +-
 tagsync/scripts/setup.py                        |  2 +-
 unixauthservice/conf.dist/log4j.properties      | 33 +++++++++
 unixauthservice/pom.xml                         |  2 +-
 .../scripts/ranger-usersync-services.sh         |  2 +-
 8 files changed, 145 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/139bdf36/security-admin/src/main/webapp/WEB-INF/log4j.properties
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/WEB-INF/log4j.properties b/security-admin/src/main/webapp/WEB-INF/log4j.properties
new file mode 100644
index 0000000..08ac852
--- /dev/null
+++ b/security-admin/src/main/webapp/WEB-INF/log4j.properties
@@ -0,0 +1,74 @@
+#
+# 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.
+#
+
+
+log4j.rootLogger = warn,xa_log_appender
+
+
+# xa_logger
+log4j.appender.xa_log_appender=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.xa_log_appender.file=${logdir}/xa_portal.log
+log4j.appender.xa_log_appender.datePattern='.'yyyy-MM-dd
+log4j.appender.xa_log_appender.append=true
+log4j.appender.xa_log_appender.layout=org.apache.log4j.PatternLayout
+log4j.appender.xa_log_appender.layout.ConversionPattern=%d [%t] %-5p %C{6} (%F:%L) - %m%n
+# xa_log_appender : category and additivity
+log4j.category.org.springframework=warn,xa_log_appender
+log4j.additivity.org.springframework=false
+
+log4j.category.org.apache.ranger=info,xa_log_appender
+log4j.additivity.org.apache.ranger=false
+
+log4j.category.xa=info,xa_log_appender
+log4j.additivity.xa=false
+
+# perf_logger
+log4j.appender.perf_appender=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.perf_appender.file=${logdir}/ranger_admin_perf.log
+log4j.appender.perf_appender.datePattern='.'yyyy-MM-dd
+log4j.appender.perf_appender.append=true
+log4j.appender.perf_appender.layout=org.apache.log4j.PatternLayout
+log4j.appender.perf_appender.layout.ConversionPattern=%d [%t] %m%n
+
+
+# sql_appender
+log4j.appender.sql_appender=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.sql_appender.file=${logdir}/xa_portal_sql.log
+log4j.appender.sql_appender.datePattern='.'yyyy-MM-dd
+log4j.appender.sql_appender.append=true
+log4j.appender.sql_appender.layout=org.apache.log4j.PatternLayout
+log4j.appender.sql_appender.layout.ConversionPattern=%d [%t] %-5p %C{6} (%F:%L) - %m%n
+
+# sql_appender : category and additivity
+log4j.category.org.hibernate.SQL=warn,sql_appender
+log4j.additivity.org.hibernate.SQL=false
+
+log4j.category.jdbc.sqlonly=fatal,sql_appender
+log4j.additivity.jdbc.sqlonly=false
+
+log4j.category.jdbc.sqltiming=warn,sql_appender
+log4j.additivity.jdbc.sqltiming=false
+
+log4j.category.jdbc.audit=fatal,sql_appender
+log4j.additivity.jdbc.audit=false
+
+log4j.category.jdbc.resultset=fatal,sql_appender
+log4j.additivity.jdbc.resultset=false
+
+log4j.category.jdbc.connection=fatal,sql_appender
+log4j.additivity.jdbc.connection=false

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/139bdf36/security-admin/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/WEB-INF/web.xml b/security-admin/src/main/webapp/WEB-INF/web.xml
index 0725633..a770e4b 100644
--- a/security-admin/src/main/webapp/WEB-INF/web.xml
+++ b/security-admin/src/main/webapp/WEB-INF/web.xml
@@ -28,7 +28,7 @@
   </context-param>
   <context-param>
     <param-name>log4jConfigLocation</param-name>
-    <param-value>/WEB-INF/log4j.xml</param-value>
+    <param-value>/WEB-INF/log4j.properties</param-value>
   </context-param>
   <listener>
     <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/139bdf36/tagsync/conf.dist/log4j.properties
----------------------------------------------------------------------
diff --git a/tagsync/conf.dist/log4j.properties b/tagsync/conf.dist/log4j.properties
new file mode 100644
index 0000000..227454c
--- /dev/null
+++ b/tagsync/conf.dist/log4j.properties
@@ -0,0 +1,33 @@
+#
+# 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.
+#
+
+
+log4j.rootLogger = info,logFile
+
+# logFile
+log4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.logFile.file=${logdir}/tagsync.log
+log4j.appender.logFile.datePattern='.'yyyy-MM-dd
+log4j.appender.logFile.layout=org.apache.log4j.PatternLayout
+log4j.appender.logFile.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} %5p %c{1} [%t] -
%L %m%n
+
+# console
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+log4j.appender.console.Target=System.out
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+log4j.appender.console.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} %5p %c{1} [%t] -
%L %m%n

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/139bdf36/tagsync/scripts/ranger-tagsync-services.sh
----------------------------------------------------------------------
diff --git a/tagsync/scripts/ranger-tagsync-services.sh b/tagsync/scripts/ranger-tagsync-services.sh
index 058ebf3..add42ee 100755
--- a/tagsync/scripts/ranger-tagsync-services.sh
+++ b/tagsync/scripts/ranger-tagsync-services.sh
@@ -74,7 +74,7 @@ if [ "${action}" == "START" ]; then
 
 	cd ${cdir}
 	umask 0077
-	nohup java -Dproc_rangertagsync ${JAVA_OPTS} -Dlogdir="${logdir}" -cp "${cp}" org.apache.ranger.tagsync.process.TagSynchronizer
 > ${logdir}/tagsync.out 2>&1 &
+	nohup java -Dproc_rangertagsync ${JAVA_OPTS} -Dlogdir="${logdir}" -Dlog4j.configuration=file:/etc/ranger/tagsync/conf/log4j.properties
-cp "${cp}" org.apache.ranger.tagsync.process.TagSynchronizer  > ${logdir}/tagsync.out
2>&1 &
 	echo $! >  ${pidf}
 	chown ranger ${pidf}
 	sleep 5

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/139bdf36/tagsync/scripts/setup.py
----------------------------------------------------------------------
diff --git a/tagsync/scripts/setup.py b/tagsync/scripts/setup.py
index 6d28cd2..59cb5c8 100755
--- a/tagsync/scripts/setup.py
+++ b/tagsync/scripts/setup.py
@@ -45,7 +45,7 @@ confDistBaseDirName = 'conf.dist'
 
 outputFileName = 'ranger-tagsync-site.xml'
 installPropFileName = 'install.properties'
-log4jFileName          = 'log4j.xml'
+log4jFileName          = 'log4j.properties'
 install2xmlMapFileName = 'installprop2xml.properties'
 templateFileName = 'ranger-tagsync-template.xml'
 initdProgramName = 'ranger-tagsync'

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/139bdf36/unixauthservice/conf.dist/log4j.properties
----------------------------------------------------------------------
diff --git a/unixauthservice/conf.dist/log4j.properties b/unixauthservice/conf.dist/log4j.properties
new file mode 100644
index 0000000..dbad541
--- /dev/null
+++ b/unixauthservice/conf.dist/log4j.properties
@@ -0,0 +1,33 @@
+#
+# 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.
+#
+
+
+log4j.rootLogger = info,logFile
+
+# logFile
+log4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.logFile.file=${logdir}/usersync.log
+log4j.appender.logFile.datePattern='.'yyyy-MM-dd
+log4j.appender.logFile.layout=org.apache.log4j.PatternLayout
+log4j.appender.logFile.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} %5p %c{1} [%t] -
%m%n
+
+# console
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+log4j.appender.console.Target=System.out
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+log4j.appender.console.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} %5p %c{1} [%t] -
%m%n

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/139bdf36/unixauthservice/pom.xml
----------------------------------------------------------------------
diff --git a/unixauthservice/pom.xml b/unixauthservice/pom.xml
index bdb5566..437279b 100644
--- a/unixauthservice/pom.xml
+++ b/unixauthservice/pom.xml
@@ -94,7 +94,7 @@
                 <targetPath>${project.build.outputDirectory}/</targetPath>
                 <directory>conf.dist</directory>
                 <includes>
-                    <include>log4j.xml</include>
+                    <include>log4j.properties</include>
                 </includes>
             </resource>
         </resources>

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/139bdf36/unixauthservice/scripts/ranger-usersync-services.sh
----------------------------------------------------------------------
diff --git a/unixauthservice/scripts/ranger-usersync-services.sh b/unixauthservice/scripts/ranger-usersync-services.sh
index 622c986..9cd5ee2 100644
--- a/unixauthservice/scripts/ranger-usersync-services.sh
+++ b/unixauthservice/scripts/ranger-usersync-services.sh
@@ -67,7 +67,7 @@ if [ "${action}" == "START" ]; then
 	    logdir=${cdir}/logs
 	fi
 
-	nohup java -Dproc_rangerusersync -Dlog4j.configuration=file:/etc/ranger/usersync/conf/log4j.xml
${JAVA_OPTS} -Dlogdir="${logdir}" -cp "${cp}" org.apache.ranger.authentication.UnixAuthenticationService
-enableUnixAuth > ${logdir}/auth.log 2>&1 &
+	nohup java -Dproc_rangerusersync -Dlog4j.configuration=file:/etc/ranger/usersync/conf/log4j.properties
${JAVA_OPTS} -Dlogdir="${logdir}" -cp "${cp}" org.apache.ranger.authentication.UnixAuthenticationService
-enableUnixAuth > ${logdir}/auth.log 2>&1 &
 	echo $! >  ${pidf}
 	chown ranger ${pidf}
 	sleep 5


Mime
View raw message