Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions api/src/test/resources/log4j2.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#
# 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.
#

# Set everything to be logged to the file target/unit-tests.log
rootLogger.level = info
rootLogger.appenderRef.file.ref = ${sys:test.appender:-File}

appender.file.type = File
appender.file.name = File
appender.file.fileName = target/unit-tests.log
appender.file.layout.type = PatternLayout
appender.file.layout.pattern = %d{yy/MM/dd HH:mm:ss.SSS} %t %p %c{1}: %m%n%ex

# Tests that launch java subprocesses can set the "test.appender" system property to
# "console" to avoid having the child process's logs overwrite the unit test's
# log file.
appender.console.type = Console
appender.console.name = console
appender.console.target = SYSTEM_ERR
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = %t: %m%n%ex

# Ignore messages below warning level from Jetty, because it's a bit verbose
logger.livy_shaded.name = org.apache.livy.shaded
logger.livy_shaded.level = info
logger.spark_project_jetty.name = org.sparkproject.jetty
logger.spark_project_jetty.level = warn
logger.eclipse_jetty.name = org.eclipse.jetty
logger.eclipse_jetty.level = warn
2 changes: 1 addition & 1 deletion client-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
<artifactId>slf4j-api</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down
41 changes: 41 additions & 0 deletions client-http/src/test/resources/log4j2.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#
# 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.
#

# Set everything to be logged to the file target/unit-tests.log
rootLogger.level = info
rootLogger.appenderRef.file.ref = ${sys:test.appender:-File}

appender.file.type = File
appender.file.name = File
appender.file.fileName = target/unit-tests.log
appender.file.layout.type = PatternLayout
appender.file.layout.pattern = %d{yy/MM/dd HH:mm:ss.SSS} %t %p %c{1}: %m%n%ex

# Tests that launch java subprocesses can set the "test.appender" system property to
# "console" to avoid having the child process's logs overwrite the unit test's
# log file.
appender.console.type = Console
appender.console.name = console
appender.console.target = SYSTEM_ERR
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = %t: %m%n%ex

# Ignore messages below warning level from Jetty, because it's a bit verbose
logger.sparkproject.name = org.apache.livy.shaded
logger.sparkproject.level = info
logger.jetty.name = org.eclipse.jetty
logger.jetty.level = warn
16 changes: 10 additions & 6 deletions conf/log4j.properties.template → conf/log4j2.properties.template
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@
# limitations under the License.
#
# The default Livy logging configuration.
log4j.rootCategory=INFO, console
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{1}: %m%n

log4j.logger.org.eclipse.jetty=WARN
rootLogger.level = info
rootLogger.appenderRef.stdout.ref = console
appender.console.type = Console
appender.console.name = console
appender.console.target = SYSTEM_ERR
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = %t: %m%n%ex

logger.jetty.name = org.eclipse.jetty
logger.jetty.level = warn
18 changes: 15 additions & 3 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,20 @@
</dependency>

<dependency>
<groupId>ch.qos.reload4j</groupId>
<artifactId>reload4j</artifactId>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
</dependency>

<dependency>
Expand All @@ -59,7 +71,7 @@

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
<artifactId>slf4j-api</artifactId>
</dependency>

<dependency>
Expand Down
33 changes: 0 additions & 33 deletions dev/docker/livy-dev-cluster/conf/livy/log4j.properties

This file was deleted.

43 changes: 43 additions & 0 deletions dev/docker/livy-dev-cluster/conf/livy/log4j2.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#
# 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.
#

property.livy.log.dir = /logs
property.livy.log.file = livy-server.log

rootLogger.level = info
rootLogger.appenderRefs = stdout, drfa
rootLogger.appenderRef.stdout.ref = stdout
rootLogger.appenderRef.drfa.ref = drfa

appender.stdout.type = Console
appender.stdout.name = stdout
appender.stdout.layout.type = PatternLayout
appender.stdout.layout.pattern = %d %p %c{1} [%t]: %m%n

appender.drfa.type = RollingFile
appender.drfa.name = drfa
appender.drfa.fileName = ${livy.log.dir}/${livy.log.file}
appender.drfa.filePattern = ${livy.log.dir}/${livy.log.file}.%d{yyyy-MM-dd}
appender.drfa.layout.type = PatternLayout
appender.drfa.layout.pattern = %d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n
appender.drfa.policies.type = Policies
appender.drfa.policies.time.type = TimeBasedTriggeringPolicy
appender.drfa.policies.time.interval = 1

logger.jetty.name = org.eclipse.jetty
logger.jetty.level = warn

35 changes: 0 additions & 35 deletions dev/docker/livy-dev-cluster/conf/master/log4j.properties

This file was deleted.

42 changes: 42 additions & 0 deletions dev/docker/livy-dev-cluster/conf/master/log4j2.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#
# 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.
#

property.spark.log.dir = /logs
property.spark.log.file = spark-master.log

rootLogger.level = info
rootLogger.appenderRefs = stdout, drfa
rootLogger.appenderRef.stdout.ref = stdout
rootLogger.appenderRef.drfa.ref = drfa

appender.stdout.type = Console
appender.stdout.name = stdout
appender.stdout.layout.type = PatternLayout
appender.stdout.layout.pattern = %d %p %c{1} [%t]: %m%n

appender.drfa.type = RollingFile
appender.drfa.name = drfa
appender.drfa.fileName = ${spark.log.dir}/${spark.log.file}
appender.drfa.filePattern = ${spark.log.dir}/${spark.log.file}.%d{yyyy-MM-dd}
appender.drfa.layout.type = PatternLayout
appender.drfa.layout.pattern = %d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n
appender.drfa.policies.type = Policies
appender.drfa.policies.time.type = TimeBasedTriggeringPolicy
appender.drfa.policies.time.interval = 1

logger.jetty.name = org.eclipse.jetty
logger.jetty.level = warn
35 changes: 0 additions & 35 deletions dev/docker/livy-dev-cluster/conf/worker/log4j.properties

This file was deleted.

43 changes: 43 additions & 0 deletions dev/docker/livy-dev-cluster/conf/worker/log4j2.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#
# 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.
#

property.spark.log.dir = /logs
property.spark.log.file = spark-worker.log

rootLogger.level = info
rootLogger.appenderRefs = stdout, drfa
rootLogger.appenderRef.stdout.ref = stdout
rootLogger.appenderRef.drfa.ref = drfa

appender.stdout.type = Console
appender.stdout.name = stdout
appender.stdout.layout.type = PatternLayout
appender.stdout.layout.pattern = %d %p %c{1} [%t]: %m%n

appender.drfa.type = RollingFile
appender.drfa.name = drfa
appender.drfa.fileName = ${spark.log.dir}/${spark.log.file}
appender.drfa.filePattern = ${spark.log.dir}/${spark.log.file}.%d{yyyy-MM-dd}
appender.drfa.layout.type = PatternLayout
appender.drfa.layout.pattern = %d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n
appender.drfa.policies.type = Policies
appender.drfa.policies.time.type = TimeBasedTriggeringPolicy
appender.drfa.policies.time.interval = 1

logger.jetty.name = org.eclipse.jetty
logger.jetty.level = warn

Loading
Loading