This is an automated email from the ASF dual-hosted git repository.
stigahuang pushed a commit to branch branch-3.4.2
in repository https://gitbox.apache.org/repos/asf/impala.git
The following commit(s) were added to refs/heads/branch-3.4.2 by this push:
new fe7299d2c IMPALA-12999: Add log4j.properties to the DEB/RPM packages
fe7299d2c is described below
commit fe7299d2cffe7430c173c1c476d3438367a22997
Author: stiga-huang <[email protected]>
AuthorDate: Fri Apr 12 21:16:22 2024 +0800
IMPALA-12999: Add log4j.properties to the DEB/RPM packages
log4j.properties is required to configure log4j before logs from it are
redirected to glog (done in GlogAppender#Install()). This is crucial to
show error logs during initialization, especially while lauching the
JVM. See the JIRA description for an example.
This copies log4j.properties from fe/src/test/resources directly since
it hasn't changed for years.
Change-Id: Iee0b9699ef313aa8e94bd351fa51fad3ea0cdf57
Reviewed-on: http://gerrit.cloudera.org:8080/21293
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
Reviewed-on: http://gerrit.cloudera.org:8080/21299
Reviewed-by: Zihao Ye <[email protected]>
Tested-by: Quanlong Huang <[email protected]>
---
package/conf/log4j.properties | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/package/conf/log4j.properties b/package/conf/log4j.properties
new file mode 100755
index 000000000..31e2a489e
--- /dev/null
+++ b/package/conf/log4j.properties
@@ -0,0 +1,28 @@
+# 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.
+
+# Define some default values that can be overridden by system properties
+# Don't use hadoop.root.logger because Hadoop's config scripts override it
+impala.hadoop.root.logger=INFO,console
+
+# Define the root logger to the system property "impala.hadoop.root.logger".
+log4j.rootLogger=${impala.hadoop.root.logger}
+
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+log4j.appender.console.target=System.err
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p
%c{2}: %m%n