summaryrefslogtreecommitdiffstats
path: root/huawei/vnfmadapter
diff options
context:
space:
mode:
Diffstat (limited to 'huawei/vnfmadapter')
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/service/pom.xml6
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/log4j.properties30
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/service/src/test/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/common/restclient/TestRestHttpContentExchange.java12
3 files changed, 28 insertions, 20 deletions
diff --git a/huawei/vnfmadapter/VnfmadapterService/service/pom.xml b/huawei/vnfmadapter/VnfmadapterService/service/pom.xml
index 9a181b7c..39eecb1e 100644
--- a/huawei/vnfmadapter/VnfmadapterService/service/pom.xml
+++ b/huawei/vnfmadapter/VnfmadapterService/service/pom.xml
@@ -91,9 +91,9 @@
</exclusions>
</dependency>
<dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>1.6.1</version>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-slf4j-impl</artifactId>
+ <version>2.13.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.orbit</groupId>
diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/log4j.properties b/huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/log4j.properties
index 635bcc51..58e5d2fd 100644
--- a/huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/log4j.properties
+++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/resources/log4j.properties
@@ -13,17 +13,25 @@
# See the License for the specific language governing permissions and
# limitations under the License.
###############################################################################
-log4j.rootLogger=INFO,root
-log4j.appender.root.Append=true
+#log4j.rootLogger=INFO,root
+rootLogger.level=INFO
+rootLogger.appenderRefs=file
+rootLogger.appenderRef.root.ref=RollingFile
#Log Directory
-logDir=/var/log/onap
-componentName=vfc
-subComponentName=huaweivnfmdriver
-log4j.appender.root.File=${logDir}/${componentName}/${subComponentName}/vnfmadapterservice.log
+property.logDir=/var/log/onap
+property.componentName=vfc
+property.subComponentName=huaweivnfmdriver
-log4j.appender.root.layout.ConversionPattern=%d %-5p [%t][%X{moduleID}][%C %L] %m%n
-log4j.appender.root.layout=org.apache.log4j.PatternLayout
-log4j.appender.root.MaxBackupIndex=50
-log4j.appender.root.MaxFileSize=20MB
-log4j.appender.root=org.apache.log4j.RollingFileAppender \ No newline at end of file
+appender.root.type = RollingFile
+appender.root.name = RollingFile
+appender.root.append=true
+appender.root.fileName=${logDir}/${componentName}/${subComponentName}/vnfmadapterservice.log
+appender.root.filePattern=${logDir}/${componentName}/${subComponentName}/vnfmadapterservice.%d{dd-MMM}.log
+appender.root.policies.type=Policies
+appender.root.policies.size.type=SizeBasedTriggeringPolicy
+appender.root.policies.size.size=20MB
+appender.root.strategy.type=DefaultRolloverStrategy
+appender.root.strategy.max=50
+appender.root.layout.type=PatternLayout
+appender.root.layout.pattern=%d %-5p [%t][%X{moduleID}][%C %L] %m%n \ No newline at end of file
diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/test/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/common/restclient/TestRestHttpContentExchange.java b/huawei/vnfmadapter/VnfmadapterService/service/src/test/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/common/restclient/TestRestHttpContentExchange.java
index ec03ea75..cf28a5c8 100644
--- a/huawei/vnfmadapter/VnfmadapterService/service/src/test/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/common/restclient/TestRestHttpContentExchange.java
+++ b/huawei/vnfmadapter/VnfmadapterService/service/src/test/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/common/restclient/TestRestHttpContentExchange.java
@@ -30,8 +30,8 @@ import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.zip.GZIPInputStream;
-import org.apache.log4j.Level;
-import org.apache.log4j.LogManager;
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.LogManager;
import org.eclipse.jetty.client.Address;
import org.eclipse.jetty.client.CachedExchange;
import org.eclipse.jetty.client.HttpDestination;
@@ -111,7 +111,7 @@ public class TestRestHttpContentExchange {
*/
@After
public void tearDown() throws Exception {
- LogManager.getLogger(RestHttpContentExchange.class).setLevel(Level.ERROR);
+ LogManager.getLogger(RestHttpContentExchange.class).atLevel(Level.ERROR);
}
/**
@@ -128,7 +128,7 @@ public class TestRestHttpContentExchange {
exchange.setRequestURI("/the/request/uri");
exchange.onRequestCommitted();
- LogManager.getLogger(RestHttpContentExchange.class).setLevel(Level.DEBUG);
+ LogManager.getLogger(RestHttpContentExchange.class).atLevel(Level.DEBUG);
exchange.onRequestCommitted();
}
@@ -146,7 +146,7 @@ public class TestRestHttpContentExchange {
exchange.setRequestURI("/the/request/uri");
exchange.onRequestComplete();
- LogManager.getLogger(RestHttpContentExchange.class).setLevel(Level.DEBUG);
+ LogManager.getLogger(RestHttpContentExchange.class).atLevel(Level.DEBUG);
exchange.onRequestComplete();
}
@@ -164,7 +164,7 @@ public class TestRestHttpContentExchange {
exchange.setRequestURI("/the/request/uri");
exchange.onResponseComplete();
- LogManager.getLogger(RestHttpContentExchange.class).setLevel(Level.DEBUG);
+ LogManager.getLogger(RestHttpContentExchange.class).atLevel(Level.DEBUG);
exchange.onResponseComplete();
final AtomicInteger isCallback = new AtomicInteger(0);