aboutsummaryrefslogtreecommitdiffstats
path: root/utils-test/src/main
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2019-02-28 13:00:16 -0500
committerJim Hahn <jrh3@att.com>2019-02-28 13:22:50 -0500
commit0e2928da2b2404f40848640e5343708cabeab410 (patch)
treef9d445edd47819de4ca543d51217e15296d379fb /utils-test/src/main
parent3849ce18d51e308bbd58b71219472c23b5f3e814 (diff)
Get proper message in test logger appender
The logger appender that's used in junit tests was getting the raw message, which still had "{}" place-holders in it. Fixed that. Split a test method to avoid checkstyle error. Change-Id: I57571d8717aaee4adb7df186fe156501e9cc669e Issue-ID: POLICY-1444 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'utils-test/src/main')
-rw-r--r--utils-test/src/main/java/org/onap/policy/common/utils/test/log/logback/ExtractAppender.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils-test/src/main/java/org/onap/policy/common/utils/test/log/logback/ExtractAppender.java b/utils-test/src/main/java/org/onap/policy/common/utils/test/log/logback/ExtractAppender.java
index 5ccb13ee..19c50968 100644
--- a/utils-test/src/main/java/org/onap/policy/common/utils/test/log/logback/ExtractAppender.java
+++ b/utils-test/src/main/java/org/onap/policy/common/utils/test/log/logback/ExtractAppender.java
@@ -2,7 +2,7 @@
* ============LICENSE_START====================================================
* Common Utils-Test
* =============================================================================
- * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
* =============================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -101,7 +101,7 @@ public class ExtractAppender extends AppenderBase<ILoggingEvent> {
@Override
protected void append(final ILoggingEvent event) {
- String msg = event.getMessage();
+ String msg = event.getFormattedMessage();
synchronized (patterns) {
if (patterns.isEmpty()) {