You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by di...@apache.org on 2022/03/03 05:52:56 UTC
[airavata-mft] branch master updated: Migrating to log4j 2.16
This is an automated email from the ASF dual-hosted git repository.
dimuthuupe pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-mft.git
The following commit(s) were added to refs/heads/master by this push:
new 1608b15 Migrating to log4j 2.16
1608b15 is described below
commit 1608b15186472e7e82d3864b9fb132210efdd072
Author: Dimuthu Wannipurage <di...@gmail.com>
AuthorDate: Thu Mar 3 00:52:46 2022 -0500
Migrating to log4j 2.16
---
agent/pom.xml | 5 --
agent/src/main/assembly/agent-bin-assembly.xml | 2 +-
agent/src/main/resources/application.properties | 1 +
.../resources/distribution/bin/agent-daemon.sh | 2 +-
agent/src/main/resources/distribution/bin/agent.sh | 2 +-
.../distribution/conf/application.properties | 1 +
.../main/resources/distribution/conf/log4j2.xml | 53 +++++++++++++++++++++
.../main/resources/distribution/conf/logback.xml | 54 ----------------------
agent/src/main/resources/log4j2.xml | 53 +++++++++++++++++++++
agent/src/main/resources/logback.xml | 54 ----------------------
api/pom.xml | 10 ++++
.../src/main/assembly/api-service-bin-assembly.xml | 2 +-
.../distribution/bin/api-service-daemon.sh | 2 +-
.../main/resources/distribution/bin/api-service.sh | 2 +-
.../main/resources/distribution/conf/log4j2.xml | 53 +++++++++++++++++++++
.../main/resources/distribution/conf/logback.xml | 54 ----------------------
api/service/src/main/resources/log4j2.xml | 53 +++++++++++++++++++++
api/service/src/main/resources/logback.xml | 54 ----------------------
controller/pom.xml | 15 ++++--
.../src/main/assembly/controller-bin-assembly.xml | 2 +-
.../distribution/bin/controller-daemon.sh | 2 +-
.../main/resources/distribution/bin/controller.sh | 2 +-
.../main/resources/distribution/conf/log4j2.xml | 53 +++++++++++++++++++++
.../main/resources/distribution/conf/logback.xml | 54 ----------------------
controller/src/main/resources/log4j2.xml | 53 +++++++++++++++++++++
controller/src/main/resources/logback.xml | 54 ----------------------
examples/pom.xml | 5 --
pom.xml | 28 ++++++++++-
services/pom.xml | 10 ++++
.../assembly/resource-service-bin-assembly.xml | 2 +-
.../distribution/bin/resource-service-daemon.sh | 2 +-
.../resources/distribution/bin/resource-service.sh | 2 +-
.../main/resources/distribution/conf/log4j2.xml | 53 +++++++++++++++++++++
.../main/resources/distribution/conf/logback.xml | 54 ----------------------
.../server/src/main/resources/log4j2.xml | 53 +++++++++++++++++++++
.../main/assembly/secret-service-bin-assembly.xml | 2 +-
.../distribution/bin/secret-service-daemon.sh | 2 +-
.../resources/distribution/bin/secret-service.sh | 2 +-
.../main/resources/distribution/conf/log4j2.xml | 53 +++++++++++++++++++++
.../main/resources/distribution/conf/logback.xml | 54 ----------------------
.../server/src/main/resources/log4j2.xml | 53 +++++++++++++++++++++
41 files changed, 604 insertions(+), 463 deletions(-)
diff --git a/agent/pom.xml b/agent/pom.xml
index b7a2ce2..cde94f0 100644
--- a/agent/pom.xml
+++ b/agent/pom.xml
@@ -115,11 +115,6 @@
<version>2.10.0</version>
</dependency>
<dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>log4j-over-slf4j</artifactId>
- <version>${log4j.over.slf4j}</version>
- </dependency>
- <dependency>
<groupId>com.sun.activation</groupId>
<artifactId>javax.activation</artifactId>
<version>1.2.0</version>
diff --git a/agent/src/main/assembly/agent-bin-assembly.xml b/agent/src/main/assembly/agent-bin-assembly.xml
index b6227da..76b4b8b 100644
--- a/agent/src/main/assembly/agent-bin-assembly.xml
+++ b/agent/src/main/assembly/agent-bin-assembly.xml
@@ -57,7 +57,7 @@
<outputDirectory>conf</outputDirectory>
<includes>
<include>application.properties</include>
- <include>logback.xml</include>
+ <include>log4j2.xml</include>
</includes>
</fileSet>
<fileSet>
diff --git a/agent/src/main/resources/application.properties b/agent/src/main/resources/application.properties
index 4d8d87c..baaad47 100644
--- a/agent/src/main/resources/application.properties
+++ b/agent/src/main/resources/application.properties
@@ -24,6 +24,7 @@ agent.user=dimuthu
agent.http.port=3333
agent.https.enabled=false
agent.supported.protocols=SCP,LOCAL,FTP
+agent.temp.data.dir=/tmp
consul.host=localhost
consul.port=8500
diff --git a/agent/src/main/resources/distribution/bin/agent-daemon.sh b/agent/src/main/resources/distribution/bin/agent-daemon.sh
index 7ac99ae..20272a2 100644
--- a/agent/src/main/resources/distribution/bin/agent-daemon.sh
+++ b/agent/src/main/resources/distribution/bin/agent-daemon.sh
@@ -23,7 +23,7 @@ CWD="$PWD"
cd ${AIRAVATA_HOME}/bin
LOGO_FILE="logo.txt"
-JAVA_OPTS="-Dspring.config.location=${AIRAVATA_HOME}/conf/ -Dairavata.home=${AIRAVATA_HOME} -Dlogback.configurationFile=file:${AIRAVATA_HOME}/conf/logback.xml"
+JAVA_OPTS="-Dspring.config.location=${AIRAVATA_HOME}/conf/ -Dairavata.home=${AIRAVATA_HOME} -Dlog4j.configurationFile=file:${AIRAVATA_HOME}/conf/log4j2.xml"
AIRAVATA_COMMAND=""
EXTRA_ARGS=""
SERVERS=""
diff --git a/agent/src/main/resources/distribution/bin/agent.sh b/agent/src/main/resources/distribution/bin/agent.sh
index 2b560d5..6ba0db7 100644
--- a/agent/src/main/resources/distribution/bin/agent.sh
+++ b/agent/src/main/resources/distribution/bin/agent.sh
@@ -23,7 +23,7 @@ CWD="$PWD"
cd ${AIRAVATA_HOME}/bin
LOGO_FILE="logo.txt"
-JAVA_OPTS="-Dspring.config.location=${AIRAVATA_HOME}/conf/ -Dairavata.home=${AIRAVATA_HOME} -Dlogback.configurationFile=file:${AIRAVATA_HOME}/conf/logback.xml"
+JAVA_OPTS="-Dspring.config.location=${AIRAVATA_HOME}/conf/ -Dairavata.home=${AIRAVATA_HOME} -Dlog4j.configurationFile=file:${AIRAVATA_HOME}/conf/log4j2.xml"
AIRAVATA_COMMAND=""
EXTRA_ARGS=""
SERVERS=""
diff --git a/agent/src/main/resources/distribution/conf/application.properties b/agent/src/main/resources/distribution/conf/application.properties
index 1b00a6c..2a20b9c 100644
--- a/agent/src/main/resources/distribution/conf/application.properties
+++ b/agent/src/main/resources/distribution/conf/application.properties
@@ -24,6 +24,7 @@ agent.user=dimuthu
agent.http.port=3333
agent.https.enabled=false
agent.supported.protocols=SCP,LOCAL,FTP
+agent.temp.data.dir=/tmp
consul.host=localhost
consul.port=8500
diff --git a/agent/src/main/resources/distribution/conf/log4j2.xml b/agent/src/main/resources/distribution/conf/log4j2.xml
new file mode 100644
index 0000000..8f3f226
--- /dev/null
+++ b/agent/src/main/resources/distribution/conf/log4j2.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+
+ 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 status="WARN">
+
+ <Appenders>
+ <Console name="Console" target="SYSTEM_OUT">
+ <PatternLayout pattern="%d [%t] %-5p %c{30} %X - %m%n"/>
+ </Console>
+ <RollingFile name="RollingFileAppender" fileName="../logs/airavata.log"
+ filePattern="logs/${date:yyyy-MM}/airavata-log-%d{MM-dd-yyyy}-%i.log.gz">
+ <PatternLayout>
+ <Pattern>%d [%t] %-5p %c{30} %X - %m%n</Pattern>
+ </PatternLayout>
+ <Policies>
+ <OnStartupTriggeringPolicy />
+ <TimeBasedTriggeringPolicy />
+ <SizeBasedTriggeringPolicy size="50 MB" />
+ </Policies>
+ <DefaultRolloverStrategy max="20" />
+ </RollingFile>
+ </Appenders>
+ <Loggers>
+ <logger name="org.apache.helix" level="WARN"/>
+ <logger name="org.apache.zookeeper" level="ERROR"/>
+ <logger name="org.apache.airavata" level="INFO"/>
+ <logger name="org.hibernate" level="ERROR"/>
+ <logger name="org.apache.coyote.http11" level="ERROR"/>
+ <Root level="INFO">
+ <AppenderRef ref="Console"/>
+ <AppenderRef ref="RollingFileAppender"/>
+ </Root>
+ </Loggers>
+</Configuration>
\ No newline at end of file
diff --git a/agent/src/main/resources/distribution/conf/logback.xml b/agent/src/main/resources/distribution/conf/logback.xml
deleted file mode 100644
index a1e67fe..0000000
--- a/agent/src/main/resources/distribution/conf/logback.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-
- 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>
-
- <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
- <encoder>
- <pattern>%d [%t] %-5p %c{30} %m [%X]%n</pattern>
- </encoder>
- </appender>
-
- <appender name="LOGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <File>../logs/airavata.log</File>
- <Append>true</Append>
- <encoder>
- <pattern>%d [%t] %-5p %c{30} %m [%X]%n</pattern>
- </encoder>
- <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <fileNamePattern>../logs/airavata.log.%d{yyyy-MM-dd}</fileNamePattern>
- <maxHistory>30</maxHistory>
- <totalSizeCap>1GB</totalSizeCap>
- </rollingPolicy>
- </appender>
-
- <logger name="ch.qos.logback" level="WARN"/>
- <logger name="org.apache.helix" level="WARN"/>
- <logger name="org.apache.zookeeper" level="ERROR"/>
- <logger name="org.apache.airavata" level="INFO"/>
- <logger name="org.hibernate" level="ERROR"/>
- <logger name="net.schmizz.sshj" level="WARN"/>
- <root level="INFO">
- <appender-ref ref="CONSOLE"/>
- <appender-ref ref="LOGFILE"/>
- </root>
-</configuration>
diff --git a/agent/src/main/resources/log4j2.xml b/agent/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..8f3f226
--- /dev/null
+++ b/agent/src/main/resources/log4j2.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+
+ 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 status="WARN">
+
+ <Appenders>
+ <Console name="Console" target="SYSTEM_OUT">
+ <PatternLayout pattern="%d [%t] %-5p %c{30} %X - %m%n"/>
+ </Console>
+ <RollingFile name="RollingFileAppender" fileName="../logs/airavata.log"
+ filePattern="logs/${date:yyyy-MM}/airavata-log-%d{MM-dd-yyyy}-%i.log.gz">
+ <PatternLayout>
+ <Pattern>%d [%t] %-5p %c{30} %X - %m%n</Pattern>
+ </PatternLayout>
+ <Policies>
+ <OnStartupTriggeringPolicy />
+ <TimeBasedTriggeringPolicy />
+ <SizeBasedTriggeringPolicy size="50 MB" />
+ </Policies>
+ <DefaultRolloverStrategy max="20" />
+ </RollingFile>
+ </Appenders>
+ <Loggers>
+ <logger name="org.apache.helix" level="WARN"/>
+ <logger name="org.apache.zookeeper" level="ERROR"/>
+ <logger name="org.apache.airavata" level="INFO"/>
+ <logger name="org.hibernate" level="ERROR"/>
+ <logger name="org.apache.coyote.http11" level="ERROR"/>
+ <Root level="INFO">
+ <AppenderRef ref="Console"/>
+ <AppenderRef ref="RollingFileAppender"/>
+ </Root>
+ </Loggers>
+</Configuration>
\ No newline at end of file
diff --git a/agent/src/main/resources/logback.xml b/agent/src/main/resources/logback.xml
deleted file mode 100644
index a1e67fe..0000000
--- a/agent/src/main/resources/logback.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-
- 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>
-
- <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
- <encoder>
- <pattern>%d [%t] %-5p %c{30} %m [%X]%n</pattern>
- </encoder>
- </appender>
-
- <appender name="LOGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <File>../logs/airavata.log</File>
- <Append>true</Append>
- <encoder>
- <pattern>%d [%t] %-5p %c{30} %m [%X]%n</pattern>
- </encoder>
- <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <fileNamePattern>../logs/airavata.log.%d{yyyy-MM-dd}</fileNamePattern>
- <maxHistory>30</maxHistory>
- <totalSizeCap>1GB</totalSizeCap>
- </rollingPolicy>
- </appender>
-
- <logger name="ch.qos.logback" level="WARN"/>
- <logger name="org.apache.helix" level="WARN"/>
- <logger name="org.apache.zookeeper" level="ERROR"/>
- <logger name="org.apache.airavata" level="INFO"/>
- <logger name="org.hibernate" level="ERROR"/>
- <logger name="net.schmizz.sshj" level="WARN"/>
- <root level="INFO">
- <appender-ref ref="CONSOLE"/>
- <appender-ref ref="LOGFILE"/>
- </root>
-</configuration>
diff --git a/api/pom.xml b/api/pom.xml
index 88a6bd4..35e8175 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -59,6 +59,16 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<version>${spring.boot.data.jpa}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-to-slf4j</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>net.sf.dozer</groupId>
diff --git a/api/service/src/main/assembly/api-service-bin-assembly.xml b/api/service/src/main/assembly/api-service-bin-assembly.xml
index 8ff3bd9..9f96565 100644
--- a/api/service/src/main/assembly/api-service-bin-assembly.xml
+++ b/api/service/src/main/assembly/api-service-bin-assembly.xml
@@ -57,7 +57,7 @@
<outputDirectory>conf</outputDirectory>
<includes>
<include>application.properties</include>
- <include>logback.xml</include>
+ <include>log4j2.xml</include>
</includes>
</fileSet>
<fileSet>
diff --git a/api/service/src/main/resources/distribution/bin/api-service-daemon.sh b/api/service/src/main/resources/distribution/bin/api-service-daemon.sh
index 9480de7..d4f14d8 100644
--- a/api/service/src/main/resources/distribution/bin/api-service-daemon.sh
+++ b/api/service/src/main/resources/distribution/bin/api-service-daemon.sh
@@ -23,7 +23,7 @@ CWD="$PWD"
cd ${AIRAVATA_HOME}/bin
LOGO_FILE="logo.txt"
-JAVA_OPTS="-Dspring.config.location=${AIRAVATA_HOME}/conf/ -Dairavata.home=${AIRAVATA_HOME} -Dlogback.configurationFile=file:${AIRAVATA_HOME}/conf/logback.xml"
+JAVA_OPTS="-Dspring.config.location=${AIRAVATA_HOME}/conf/ -Dairavata.home=${AIRAVATA_HOME} -Dlog4j.configurationFile=file:${AIRAVATA_HOME}/conf/log4j2.xml"
AIRAVATA_COMMAND=""
EXTRA_ARGS=""
SERVERS=""
diff --git a/api/service/src/main/resources/distribution/bin/api-service.sh b/api/service/src/main/resources/distribution/bin/api-service.sh
index d4de43d..5d273e7 100644
--- a/api/service/src/main/resources/distribution/bin/api-service.sh
+++ b/api/service/src/main/resources/distribution/bin/api-service.sh
@@ -23,7 +23,7 @@ CWD="$PWD"
cd ${AIRAVATA_HOME}/bin
LOGO_FILE="logo.txt"
-JAVA_OPTS="-Dspring.config.location=${AIRAVATA_HOME}/conf/ -Dairavata.home=${AIRAVATA_HOME} -Dlogback.configurationFile=file:${AIRAVATA_HOME}/conf/logback.xml"
+JAVA_OPTS="-Dspring.config.location=${AIRAVATA_HOME}/conf/ -Dairavata.home=${AIRAVATA_HOME} -Dlog4j.configurationFile=file:${AIRAVATA_HOME}/conf/log4j2.xml"
AIRAVATA_COMMAND=""
EXTRA_ARGS=""
SERVERS=""
diff --git a/api/service/src/main/resources/distribution/conf/log4j2.xml b/api/service/src/main/resources/distribution/conf/log4j2.xml
new file mode 100644
index 0000000..8f3f226
--- /dev/null
+++ b/api/service/src/main/resources/distribution/conf/log4j2.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+
+ 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 status="WARN">
+
+ <Appenders>
+ <Console name="Console" target="SYSTEM_OUT">
+ <PatternLayout pattern="%d [%t] %-5p %c{30} %X - %m%n"/>
+ </Console>
+ <RollingFile name="RollingFileAppender" fileName="../logs/airavata.log"
+ filePattern="logs/${date:yyyy-MM}/airavata-log-%d{MM-dd-yyyy}-%i.log.gz">
+ <PatternLayout>
+ <Pattern>%d [%t] %-5p %c{30} %X - %m%n</Pattern>
+ </PatternLayout>
+ <Policies>
+ <OnStartupTriggeringPolicy />
+ <TimeBasedTriggeringPolicy />
+ <SizeBasedTriggeringPolicy size="50 MB" />
+ </Policies>
+ <DefaultRolloverStrategy max="20" />
+ </RollingFile>
+ </Appenders>
+ <Loggers>
+ <logger name="org.apache.helix" level="WARN"/>
+ <logger name="org.apache.zookeeper" level="ERROR"/>
+ <logger name="org.apache.airavata" level="INFO"/>
+ <logger name="org.hibernate" level="ERROR"/>
+ <logger name="org.apache.coyote.http11" level="ERROR"/>
+ <Root level="INFO">
+ <AppenderRef ref="Console"/>
+ <AppenderRef ref="RollingFileAppender"/>
+ </Root>
+ </Loggers>
+</Configuration>
\ No newline at end of file
diff --git a/api/service/src/main/resources/distribution/conf/logback.xml b/api/service/src/main/resources/distribution/conf/logback.xml
deleted file mode 100644
index a1e67fe..0000000
--- a/api/service/src/main/resources/distribution/conf/logback.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-
- 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>
-
- <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
- <encoder>
- <pattern>%d [%t] %-5p %c{30} %m [%X]%n</pattern>
- </encoder>
- </appender>
-
- <appender name="LOGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <File>../logs/airavata.log</File>
- <Append>true</Append>
- <encoder>
- <pattern>%d [%t] %-5p %c{30} %m [%X]%n</pattern>
- </encoder>
- <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <fileNamePattern>../logs/airavata.log.%d{yyyy-MM-dd}</fileNamePattern>
- <maxHistory>30</maxHistory>
- <totalSizeCap>1GB</totalSizeCap>
- </rollingPolicy>
- </appender>
-
- <logger name="ch.qos.logback" level="WARN"/>
- <logger name="org.apache.helix" level="WARN"/>
- <logger name="org.apache.zookeeper" level="ERROR"/>
- <logger name="org.apache.airavata" level="INFO"/>
- <logger name="org.hibernate" level="ERROR"/>
- <logger name="net.schmizz.sshj" level="WARN"/>
- <root level="INFO">
- <appender-ref ref="CONSOLE"/>
- <appender-ref ref="LOGFILE"/>
- </root>
-</configuration>
diff --git a/api/service/src/main/resources/log4j2.xml b/api/service/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..8f3f226
--- /dev/null
+++ b/api/service/src/main/resources/log4j2.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+
+ 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 status="WARN">
+
+ <Appenders>
+ <Console name="Console" target="SYSTEM_OUT">
+ <PatternLayout pattern="%d [%t] %-5p %c{30} %X - %m%n"/>
+ </Console>
+ <RollingFile name="RollingFileAppender" fileName="../logs/airavata.log"
+ filePattern="logs/${date:yyyy-MM}/airavata-log-%d{MM-dd-yyyy}-%i.log.gz">
+ <PatternLayout>
+ <Pattern>%d [%t] %-5p %c{30} %X - %m%n</Pattern>
+ </PatternLayout>
+ <Policies>
+ <OnStartupTriggeringPolicy />
+ <TimeBasedTriggeringPolicy />
+ <SizeBasedTriggeringPolicy size="50 MB" />
+ </Policies>
+ <DefaultRolloverStrategy max="20" />
+ </RollingFile>
+ </Appenders>
+ <Loggers>
+ <logger name="org.apache.helix" level="WARN"/>
+ <logger name="org.apache.zookeeper" level="ERROR"/>
+ <logger name="org.apache.airavata" level="INFO"/>
+ <logger name="org.hibernate" level="ERROR"/>
+ <logger name="org.apache.coyote.http11" level="ERROR"/>
+ <Root level="INFO">
+ <AppenderRef ref="Console"/>
+ <AppenderRef ref="RollingFileAppender"/>
+ </Root>
+ </Loggers>
+</Configuration>
\ No newline at end of file
diff --git a/api/service/src/main/resources/logback.xml b/api/service/src/main/resources/logback.xml
deleted file mode 100644
index a1e67fe..0000000
--- a/api/service/src/main/resources/logback.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-
- 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>
-
- <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
- <encoder>
- <pattern>%d [%t] %-5p %c{30} %m [%X]%n</pattern>
- </encoder>
- </appender>
-
- <appender name="LOGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <File>../logs/airavata.log</File>
- <Append>true</Append>
- <encoder>
- <pattern>%d [%t] %-5p %c{30} %m [%X]%n</pattern>
- </encoder>
- <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <fileNamePattern>../logs/airavata.log.%d{yyyy-MM-dd}</fileNamePattern>
- <maxHistory>30</maxHistory>
- <totalSizeCap>1GB</totalSizeCap>
- </rollingPolicy>
- </appender>
-
- <logger name="ch.qos.logback" level="WARN"/>
- <logger name="org.apache.helix" level="WARN"/>
- <logger name="org.apache.zookeeper" level="ERROR"/>
- <logger name="org.apache.airavata" level="INFO"/>
- <logger name="org.hibernate" level="ERROR"/>
- <logger name="net.schmizz.sshj" level="WARN"/>
- <root level="INFO">
- <appender-ref ref="CONSOLE"/>
- <appender-ref ref="LOGFILE"/>
- </root>
-</configuration>
diff --git a/controller/pom.xml b/controller/pom.xml
index e588470..a701432 100644
--- a/controller/pom.xml
+++ b/controller/pom.xml
@@ -44,11 +44,6 @@
<version>${consul.client}</version>
</dependency>
<dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>log4j-over-slf4j</artifactId>
- <version>${log4j.over.slf4j}</version>
- </dependency>
- <dependency>
<groupId>io.github.lognet</groupId>
<artifactId>grpc-spring-boot-starter</artifactId>
<version>${grpc.spring.boot}</version>
@@ -63,6 +58,16 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<version>${spring.boot.data.jpa}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-to-slf4j</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>net.sf.dozer</groupId>
diff --git a/controller/src/main/assembly/controller-bin-assembly.xml b/controller/src/main/assembly/controller-bin-assembly.xml
index 43f0448..785fbb8 100644
--- a/controller/src/main/assembly/controller-bin-assembly.xml
+++ b/controller/src/main/assembly/controller-bin-assembly.xml
@@ -57,7 +57,7 @@
<outputDirectory>conf</outputDirectory>
<includes>
<include>application.properties</include>
- <include>logback.xml</include>
+ <include>log4j2.xml</include>
</includes>
</fileSet>
<fileSet>
diff --git a/controller/src/main/resources/distribution/bin/controller-daemon.sh b/controller/src/main/resources/distribution/bin/controller-daemon.sh
index 4292d11..5c7d30c 100644
--- a/controller/src/main/resources/distribution/bin/controller-daemon.sh
+++ b/controller/src/main/resources/distribution/bin/controller-daemon.sh
@@ -23,7 +23,7 @@ CWD="$PWD"
cd ${AIRAVATA_HOME}/bin
LOGO_FILE="logo.txt"
-JAVA_OPTS="-Dspring.config.location=${AIRAVATA_HOME}/conf/ -Dairavata.home=${AIRAVATA_HOME} -Dlogback.configurationFile=file:${AIRAVATA_HOME}/conf/logback.xml"
+JAVA_OPTS="-Dspring.config.location=${AIRAVATA_HOME}/conf/ -Dairavata.home=${AIRAVATA_HOME} -Dlog4j.configurationFile=file:${AIRAVATA_HOME}/conf/log4j2.xml"
AIRAVATA_COMMAND=""
EXTRA_ARGS=""
SERVERS=""
diff --git a/controller/src/main/resources/distribution/bin/controller.sh b/controller/src/main/resources/distribution/bin/controller.sh
index e0130a1..a4e7f85 100644
--- a/controller/src/main/resources/distribution/bin/controller.sh
+++ b/controller/src/main/resources/distribution/bin/controller.sh
@@ -23,7 +23,7 @@ CWD="$PWD"
cd ${AIRAVATA_HOME}/bin
LOGO_FILE="logo.txt"
-JAVA_OPTS="-Dspring.config.location=${AIRAVATA_HOME}/conf/ -Dairavata.home=${AIRAVATA_HOME} -Dlogback.configurationFile=file:${AIRAVATA_HOME}/conf/logback.xml"
+JAVA_OPTS="-Dspring.config.location=${AIRAVATA_HOME}/conf/ -Dairavata.home=${AIRAVATA_HOME} -Dlog4j.configurationFile=file:${AIRAVATA_HOME}/conf/log4j2.xml"
AIRAVATA_COMMAND=""
EXTRA_ARGS=""
SERVERS=""
diff --git a/controller/src/main/resources/distribution/conf/log4j2.xml b/controller/src/main/resources/distribution/conf/log4j2.xml
new file mode 100644
index 0000000..8f3f226
--- /dev/null
+++ b/controller/src/main/resources/distribution/conf/log4j2.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+
+ 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 status="WARN">
+
+ <Appenders>
+ <Console name="Console" target="SYSTEM_OUT">
+ <PatternLayout pattern="%d [%t] %-5p %c{30} %X - %m%n"/>
+ </Console>
+ <RollingFile name="RollingFileAppender" fileName="../logs/airavata.log"
+ filePattern="logs/${date:yyyy-MM}/airavata-log-%d{MM-dd-yyyy}-%i.log.gz">
+ <PatternLayout>
+ <Pattern>%d [%t] %-5p %c{30} %X - %m%n</Pattern>
+ </PatternLayout>
+ <Policies>
+ <OnStartupTriggeringPolicy />
+ <TimeBasedTriggeringPolicy />
+ <SizeBasedTriggeringPolicy size="50 MB" />
+ </Policies>
+ <DefaultRolloverStrategy max="20" />
+ </RollingFile>
+ </Appenders>
+ <Loggers>
+ <logger name="org.apache.helix" level="WARN"/>
+ <logger name="org.apache.zookeeper" level="ERROR"/>
+ <logger name="org.apache.airavata" level="INFO"/>
+ <logger name="org.hibernate" level="ERROR"/>
+ <logger name="org.apache.coyote.http11" level="ERROR"/>
+ <Root level="INFO">
+ <AppenderRef ref="Console"/>
+ <AppenderRef ref="RollingFileAppender"/>
+ </Root>
+ </Loggers>
+</Configuration>
\ No newline at end of file
diff --git a/controller/src/main/resources/distribution/conf/logback.xml b/controller/src/main/resources/distribution/conf/logback.xml
deleted file mode 100644
index a1e67fe..0000000
--- a/controller/src/main/resources/distribution/conf/logback.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-
- 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>
-
- <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
- <encoder>
- <pattern>%d [%t] %-5p %c{30} %m [%X]%n</pattern>
- </encoder>
- </appender>
-
- <appender name="LOGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <File>../logs/airavata.log</File>
- <Append>true</Append>
- <encoder>
- <pattern>%d [%t] %-5p %c{30} %m [%X]%n</pattern>
- </encoder>
- <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <fileNamePattern>../logs/airavata.log.%d{yyyy-MM-dd}</fileNamePattern>
- <maxHistory>30</maxHistory>
- <totalSizeCap>1GB</totalSizeCap>
- </rollingPolicy>
- </appender>
-
- <logger name="ch.qos.logback" level="WARN"/>
- <logger name="org.apache.helix" level="WARN"/>
- <logger name="org.apache.zookeeper" level="ERROR"/>
- <logger name="org.apache.airavata" level="INFO"/>
- <logger name="org.hibernate" level="ERROR"/>
- <logger name="net.schmizz.sshj" level="WARN"/>
- <root level="INFO">
- <appender-ref ref="CONSOLE"/>
- <appender-ref ref="LOGFILE"/>
- </root>
-</configuration>
diff --git a/controller/src/main/resources/log4j2.xml b/controller/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..8f3f226
--- /dev/null
+++ b/controller/src/main/resources/log4j2.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+
+ 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 status="WARN">
+
+ <Appenders>
+ <Console name="Console" target="SYSTEM_OUT">
+ <PatternLayout pattern="%d [%t] %-5p %c{30} %X - %m%n"/>
+ </Console>
+ <RollingFile name="RollingFileAppender" fileName="../logs/airavata.log"
+ filePattern="logs/${date:yyyy-MM}/airavata-log-%d{MM-dd-yyyy}-%i.log.gz">
+ <PatternLayout>
+ <Pattern>%d [%t] %-5p %c{30} %X - %m%n</Pattern>
+ </PatternLayout>
+ <Policies>
+ <OnStartupTriggeringPolicy />
+ <TimeBasedTriggeringPolicy />
+ <SizeBasedTriggeringPolicy size="50 MB" />
+ </Policies>
+ <DefaultRolloverStrategy max="20" />
+ </RollingFile>
+ </Appenders>
+ <Loggers>
+ <logger name="org.apache.helix" level="WARN"/>
+ <logger name="org.apache.zookeeper" level="ERROR"/>
+ <logger name="org.apache.airavata" level="INFO"/>
+ <logger name="org.hibernate" level="ERROR"/>
+ <logger name="org.apache.coyote.http11" level="ERROR"/>
+ <Root level="INFO">
+ <AppenderRef ref="Console"/>
+ <AppenderRef ref="RollingFileAppender"/>
+ </Root>
+ </Loggers>
+</Configuration>
\ No newline at end of file
diff --git a/controller/src/main/resources/logback.xml b/controller/src/main/resources/logback.xml
deleted file mode 100644
index a1e67fe..0000000
--- a/controller/src/main/resources/logback.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-
- 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>
-
- <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
- <encoder>
- <pattern>%d [%t] %-5p %c{30} %m [%X]%n</pattern>
- </encoder>
- </appender>
-
- <appender name="LOGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <File>../logs/airavata.log</File>
- <Append>true</Append>
- <encoder>
- <pattern>%d [%t] %-5p %c{30} %m [%X]%n</pattern>
- </encoder>
- <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <fileNamePattern>../logs/airavata.log.%d{yyyy-MM-dd}</fileNamePattern>
- <maxHistory>30</maxHistory>
- <totalSizeCap>1GB</totalSizeCap>
- </rollingPolicy>
- </appender>
-
- <logger name="ch.qos.logback" level="WARN"/>
- <logger name="org.apache.helix" level="WARN"/>
- <logger name="org.apache.zookeeper" level="ERROR"/>
- <logger name="org.apache.airavata" level="INFO"/>
- <logger name="org.hibernate" level="ERROR"/>
- <logger name="net.schmizz.sshj" level="WARN"/>
- <root level="INFO">
- <appender-ref ref="CONSOLE"/>
- <appender-ref ref="LOGFILE"/>
- </root>
-</configuration>
diff --git a/examples/pom.xml b/examples/pom.xml
index 6c81e5f..28cc03a 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -39,10 +39,5 @@
<groupId>org.apache.airavata</groupId>
<version>0.01-SNAPSHOT</version>
</dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>log4j-over-slf4j</artifactId>
- <version>${log4j.over.slf4j}</version>
- </dependency>
</dependencies>
</project>
diff --git a/pom.xml b/pom.xml
index 567b6be..2283ba6 100755
--- a/pom.xml
+++ b/pom.xml
@@ -106,6 +106,31 @@
<artifactId>javax.annotation-api</artifactId>
<version>${javax.annotation}</version>
</dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>${org.slf4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-api</artifactId>
+ <version>${log4j2.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>${log4j2.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-slf4j-impl</artifactId>
+ <version>${log4j2.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-1.2-api</artifactId>
+ <version>${log4j2.version}</version>
+ </dependency>
</dependencies>
<properties>
@@ -117,7 +142,8 @@
<protobuf.java>3.10.0</protobuf.java>
<grpc.spring.boot>3.5.1</grpc.spring.boot>
<spring.boot.data.jpa>2.2.1.RELEASE</spring.boot.data.jpa>
- <log4j.over.slf4j>1.7.26</log4j.over.slf4j>
+ <org.slf4j.version>1.7.25</org.slf4j.version>
+ <log4j2.version>2.16.0</log4j2.version>
<dozer>5.5.1</dozer>
<jsch>0.1.55</jsch>
<sshj>0.27.0</sshj>
diff --git a/services/pom.xml b/services/pom.xml
index b6b2fde..ca3541b 100644
--- a/services/pom.xml
+++ b/services/pom.xml
@@ -63,6 +63,16 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<version>${spring.boot.data.jpa}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-to-slf4j</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>net.sf.dozer</groupId>
diff --git a/services/resource-service/server/src/main/assembly/resource-service-bin-assembly.xml b/services/resource-service/server/src/main/assembly/resource-service-bin-assembly.xml
index db96c90..bdc7ccb 100644
--- a/services/resource-service/server/src/main/assembly/resource-service-bin-assembly.xml
+++ b/services/resource-service/server/src/main/assembly/resource-service-bin-assembly.xml
@@ -57,7 +57,7 @@
<outputDirectory>conf</outputDirectory>
<includes>
<include>application.properties</include>
- <include>logback.xml</include>
+ <include>log4j2.xml</include>
<include>applicationContext.xml</include>
<include>resources.json</include>
</includes>
diff --git a/services/resource-service/server/src/main/resources/distribution/bin/resource-service-daemon.sh b/services/resource-service/server/src/main/resources/distribution/bin/resource-service-daemon.sh
index b7272e7..8b8e7d4 100644
--- a/services/resource-service/server/src/main/resources/distribution/bin/resource-service-daemon.sh
+++ b/services/resource-service/server/src/main/resources/distribution/bin/resource-service-daemon.sh
@@ -23,7 +23,7 @@ CWD="$PWD"
cd ${AIRAVATA_HOME}/bin
LOGO_FILE="logo.txt"
-JAVA_OPTS="-Dspring.config.location=${AIRAVATA_HOME}/conf/ -Dairavata.home=${AIRAVATA_HOME} -Dlogging.config=file:${AIRAVATA_HOME}/conf/logback.xml"
+JAVA_OPTS="-Dspring.config.location=${AIRAVATA_HOME}/conf/ -Dairavata.home=${AIRAVATA_HOME} -Dlog4j.configurationFile=file:${AIRAVATA_HOME}/conf/log4j2.xml"
AIRAVATA_COMMAND=""
EXTRA_ARGS=""
SERVERS=""
diff --git a/services/resource-service/server/src/main/resources/distribution/bin/resource-service.sh b/services/resource-service/server/src/main/resources/distribution/bin/resource-service.sh
index 4db00b7..fdf7ea0 100644
--- a/services/resource-service/server/src/main/resources/distribution/bin/resource-service.sh
+++ b/services/resource-service/server/src/main/resources/distribution/bin/resource-service.sh
@@ -23,7 +23,7 @@ CWD="$PWD"
cd ${AIRAVATA_HOME}/bin
LOGO_FILE="logo.txt"
-JAVA_OPTS="-Dspring.config.location=${AIRAVATA_HOME}/conf/ -Dairavata.home=${AIRAVATA_HOME} -Dlogging.config=file:${AIRAVATA_HOME}/conf/logback.xml"
+JAVA_OPTS="-Dspring.config.location=${AIRAVATA_HOME}/conf/ -Dairavata.home=${AIRAVATA_HOME} -Dlog4j.configurationFile=file:${AIRAVATA_HOME}/conf/log4j2.xml"
AIRAVATA_COMMAND=""
EXTRA_ARGS=""
SERVERS=""
diff --git a/services/resource-service/server/src/main/resources/distribution/conf/log4j2.xml b/services/resource-service/server/src/main/resources/distribution/conf/log4j2.xml
new file mode 100644
index 0000000..8f3f226
--- /dev/null
+++ b/services/resource-service/server/src/main/resources/distribution/conf/log4j2.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+
+ 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 status="WARN">
+
+ <Appenders>
+ <Console name="Console" target="SYSTEM_OUT">
+ <PatternLayout pattern="%d [%t] %-5p %c{30} %X - %m%n"/>
+ </Console>
+ <RollingFile name="RollingFileAppender" fileName="../logs/airavata.log"
+ filePattern="logs/${date:yyyy-MM}/airavata-log-%d{MM-dd-yyyy}-%i.log.gz">
+ <PatternLayout>
+ <Pattern>%d [%t] %-5p %c{30} %X - %m%n</Pattern>
+ </PatternLayout>
+ <Policies>
+ <OnStartupTriggeringPolicy />
+ <TimeBasedTriggeringPolicy />
+ <SizeBasedTriggeringPolicy size="50 MB" />
+ </Policies>
+ <DefaultRolloverStrategy max="20" />
+ </RollingFile>
+ </Appenders>
+ <Loggers>
+ <logger name="org.apache.helix" level="WARN"/>
+ <logger name="org.apache.zookeeper" level="ERROR"/>
+ <logger name="org.apache.airavata" level="INFO"/>
+ <logger name="org.hibernate" level="ERROR"/>
+ <logger name="org.apache.coyote.http11" level="ERROR"/>
+ <Root level="INFO">
+ <AppenderRef ref="Console"/>
+ <AppenderRef ref="RollingFileAppender"/>
+ </Root>
+ </Loggers>
+</Configuration>
\ No newline at end of file
diff --git a/services/resource-service/server/src/main/resources/distribution/conf/logback.xml b/services/resource-service/server/src/main/resources/distribution/conf/logback.xml
deleted file mode 100644
index a1e67fe..0000000
--- a/services/resource-service/server/src/main/resources/distribution/conf/logback.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-
- 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>
-
- <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
- <encoder>
- <pattern>%d [%t] %-5p %c{30} %m [%X]%n</pattern>
- </encoder>
- </appender>
-
- <appender name="LOGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <File>../logs/airavata.log</File>
- <Append>true</Append>
- <encoder>
- <pattern>%d [%t] %-5p %c{30} %m [%X]%n</pattern>
- </encoder>
- <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <fileNamePattern>../logs/airavata.log.%d{yyyy-MM-dd}</fileNamePattern>
- <maxHistory>30</maxHistory>
- <totalSizeCap>1GB</totalSizeCap>
- </rollingPolicy>
- </appender>
-
- <logger name="ch.qos.logback" level="WARN"/>
- <logger name="org.apache.helix" level="WARN"/>
- <logger name="org.apache.zookeeper" level="ERROR"/>
- <logger name="org.apache.airavata" level="INFO"/>
- <logger name="org.hibernate" level="ERROR"/>
- <logger name="net.schmizz.sshj" level="WARN"/>
- <root level="INFO">
- <appender-ref ref="CONSOLE"/>
- <appender-ref ref="LOGFILE"/>
- </root>
-</configuration>
diff --git a/services/resource-service/server/src/main/resources/log4j2.xml b/services/resource-service/server/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..8f3f226
--- /dev/null
+++ b/services/resource-service/server/src/main/resources/log4j2.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+
+ 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 status="WARN">
+
+ <Appenders>
+ <Console name="Console" target="SYSTEM_OUT">
+ <PatternLayout pattern="%d [%t] %-5p %c{30} %X - %m%n"/>
+ </Console>
+ <RollingFile name="RollingFileAppender" fileName="../logs/airavata.log"
+ filePattern="logs/${date:yyyy-MM}/airavata-log-%d{MM-dd-yyyy}-%i.log.gz">
+ <PatternLayout>
+ <Pattern>%d [%t] %-5p %c{30} %X - %m%n</Pattern>
+ </PatternLayout>
+ <Policies>
+ <OnStartupTriggeringPolicy />
+ <TimeBasedTriggeringPolicy />
+ <SizeBasedTriggeringPolicy size="50 MB" />
+ </Policies>
+ <DefaultRolloverStrategy max="20" />
+ </RollingFile>
+ </Appenders>
+ <Loggers>
+ <logger name="org.apache.helix" level="WARN"/>
+ <logger name="org.apache.zookeeper" level="ERROR"/>
+ <logger name="org.apache.airavata" level="INFO"/>
+ <logger name="org.hibernate" level="ERROR"/>
+ <logger name="org.apache.coyote.http11" level="ERROR"/>
+ <Root level="INFO">
+ <AppenderRef ref="Console"/>
+ <AppenderRef ref="RollingFileAppender"/>
+ </Root>
+ </Loggers>
+</Configuration>
\ No newline at end of file
diff --git a/services/secret-service/server/src/main/assembly/secret-service-bin-assembly.xml b/services/secret-service/server/src/main/assembly/secret-service-bin-assembly.xml
index a30fc97..8a537e1 100644
--- a/services/secret-service/server/src/main/assembly/secret-service-bin-assembly.xml
+++ b/services/secret-service/server/src/main/assembly/secret-service-bin-assembly.xml
@@ -57,7 +57,7 @@
<outputDirectory>conf</outputDirectory>
<includes>
<include>application.properties</include>
- <include>logback.xml</include>
+ <include>log4j2.xml</include>
<include>applicationContext.xml</include>
<include>secrets.json</include>
</includes>
diff --git a/services/secret-service/server/src/main/resources/distribution/bin/secret-service-daemon.sh b/services/secret-service/server/src/main/resources/distribution/bin/secret-service-daemon.sh
index f4978a3..161e52b 100644
--- a/services/secret-service/server/src/main/resources/distribution/bin/secret-service-daemon.sh
+++ b/services/secret-service/server/src/main/resources/distribution/bin/secret-service-daemon.sh
@@ -23,7 +23,7 @@ CWD="$PWD"
cd ${AIRAVATA_HOME}/bin
LOGO_FILE="logo.txt"
-JAVA_OPTS="-Dspring.config.location=${AIRAVATA_HOME}/conf/ -Dairavata.home=${AIRAVATA_HOME} -Dlogging.config=file:${AIRAVATA_HOME}/conf/logback.xml"
+JAVA_OPTS="-Dspring.config.location=${AIRAVATA_HOME}/conf/ -Dairavata.home=${AIRAVATA_HOME} -Dlog4j.configurationFile=file:${AIRAVATA_HOME}/conf/log4j2.xml"
AIRAVATA_COMMAND=""
EXTRA_ARGS=""
SERVERS=""
diff --git a/services/secret-service/server/src/main/resources/distribution/bin/secret-service.sh b/services/secret-service/server/src/main/resources/distribution/bin/secret-service.sh
index c5909b8..99f14bd 100644
--- a/services/secret-service/server/src/main/resources/distribution/bin/secret-service.sh
+++ b/services/secret-service/server/src/main/resources/distribution/bin/secret-service.sh
@@ -23,7 +23,7 @@ CWD="$PWD"
cd ${AIRAVATA_HOME}/bin
LOGO_FILE="logo.txt"
-JAVA_OPTS="-Dspring.config.location=${AIRAVATA_HOME}/conf/ -Dairavata.home=${AIRAVATA_HOME} -Dlogging.config=file:${AIRAVATA_HOME}/conf/logback.xml"
+JAVA_OPTS="-Dspring.config.location=${AIRAVATA_HOME}/conf/ -Dairavata.home=${AIRAVATA_HOME} -Dlog4j.configurationFile=file:${AIRAVATA_HOME}/conf/log4j2.xml"
AIRAVATA_COMMAND=""
EXTRA_ARGS=""
SERVERS=""
diff --git a/services/secret-service/server/src/main/resources/distribution/conf/log4j2.xml b/services/secret-service/server/src/main/resources/distribution/conf/log4j2.xml
new file mode 100644
index 0000000..8f3f226
--- /dev/null
+++ b/services/secret-service/server/src/main/resources/distribution/conf/log4j2.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+
+ 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 status="WARN">
+
+ <Appenders>
+ <Console name="Console" target="SYSTEM_OUT">
+ <PatternLayout pattern="%d [%t] %-5p %c{30} %X - %m%n"/>
+ </Console>
+ <RollingFile name="RollingFileAppender" fileName="../logs/airavata.log"
+ filePattern="logs/${date:yyyy-MM}/airavata-log-%d{MM-dd-yyyy}-%i.log.gz">
+ <PatternLayout>
+ <Pattern>%d [%t] %-5p %c{30} %X - %m%n</Pattern>
+ </PatternLayout>
+ <Policies>
+ <OnStartupTriggeringPolicy />
+ <TimeBasedTriggeringPolicy />
+ <SizeBasedTriggeringPolicy size="50 MB" />
+ </Policies>
+ <DefaultRolloverStrategy max="20" />
+ </RollingFile>
+ </Appenders>
+ <Loggers>
+ <logger name="org.apache.helix" level="WARN"/>
+ <logger name="org.apache.zookeeper" level="ERROR"/>
+ <logger name="org.apache.airavata" level="INFO"/>
+ <logger name="org.hibernate" level="ERROR"/>
+ <logger name="org.apache.coyote.http11" level="ERROR"/>
+ <Root level="INFO">
+ <AppenderRef ref="Console"/>
+ <AppenderRef ref="RollingFileAppender"/>
+ </Root>
+ </Loggers>
+</Configuration>
\ No newline at end of file
diff --git a/services/secret-service/server/src/main/resources/distribution/conf/logback.xml b/services/secret-service/server/src/main/resources/distribution/conf/logback.xml
deleted file mode 100644
index a1e67fe..0000000
--- a/services/secret-service/server/src/main/resources/distribution/conf/logback.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-
- 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>
-
- <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
- <encoder>
- <pattern>%d [%t] %-5p %c{30} %m [%X]%n</pattern>
- </encoder>
- </appender>
-
- <appender name="LOGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <File>../logs/airavata.log</File>
- <Append>true</Append>
- <encoder>
- <pattern>%d [%t] %-5p %c{30} %m [%X]%n</pattern>
- </encoder>
- <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <fileNamePattern>../logs/airavata.log.%d{yyyy-MM-dd}</fileNamePattern>
- <maxHistory>30</maxHistory>
- <totalSizeCap>1GB</totalSizeCap>
- </rollingPolicy>
- </appender>
-
- <logger name="ch.qos.logback" level="WARN"/>
- <logger name="org.apache.helix" level="WARN"/>
- <logger name="org.apache.zookeeper" level="ERROR"/>
- <logger name="org.apache.airavata" level="INFO"/>
- <logger name="org.hibernate" level="ERROR"/>
- <logger name="net.schmizz.sshj" level="WARN"/>
- <root level="INFO">
- <appender-ref ref="CONSOLE"/>
- <appender-ref ref="LOGFILE"/>
- </root>
-</configuration>
diff --git a/services/secret-service/server/src/main/resources/log4j2.xml b/services/secret-service/server/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..8f3f226
--- /dev/null
+++ b/services/secret-service/server/src/main/resources/log4j2.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+
+ 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 status="WARN">
+
+ <Appenders>
+ <Console name="Console" target="SYSTEM_OUT">
+ <PatternLayout pattern="%d [%t] %-5p %c{30} %X - %m%n"/>
+ </Console>
+ <RollingFile name="RollingFileAppender" fileName="../logs/airavata.log"
+ filePattern="logs/${date:yyyy-MM}/airavata-log-%d{MM-dd-yyyy}-%i.log.gz">
+ <PatternLayout>
+ <Pattern>%d [%t] %-5p %c{30} %X - %m%n</Pattern>
+ </PatternLayout>
+ <Policies>
+ <OnStartupTriggeringPolicy />
+ <TimeBasedTriggeringPolicy />
+ <SizeBasedTriggeringPolicy size="50 MB" />
+ </Policies>
+ <DefaultRolloverStrategy max="20" />
+ </RollingFile>
+ </Appenders>
+ <Loggers>
+ <logger name="org.apache.helix" level="WARN"/>
+ <logger name="org.apache.zookeeper" level="ERROR"/>
+ <logger name="org.apache.airavata" level="INFO"/>
+ <logger name="org.hibernate" level="ERROR"/>
+ <logger name="org.apache.coyote.http11" level="ERROR"/>
+ <Root level="INFO">
+ <AppenderRef ref="Console"/>
+ <AppenderRef ref="RollingFileAppender"/>
+ </Root>
+ </Loggers>
+</Configuration>
\ No newline at end of file