aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common
diff options
context:
space:
mode:
authorEylon Malin <eylon.malin@intl.att.com>2019-10-24 14:36:42 +0300
committerEylon Malin <eylon.malin@intl.att.com>2019-10-24 14:55:54 +0300
commit67f6ab5e1c890fcb636e78fcd5b9502746e6a794 (patch)
tree21623acc5368690cc21687285dce4ae9cc1660dd /vid-app-common
parent32d04d886b60649fe036b335745cbd5fab4898b1 (diff)
log VID is started on startup
Issue-ID: VID-253 Logging api tests use this indication for getting only relevant log lines Change-Id: I3cb829ab5a0f3cead3db50859da2ba12df75a971 Signed-off-by: Eylon Malin <eylon.malin@intl.att.com>
Diffstat (limited to 'vid-app-common')
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/controller/LoggerController.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/LoggerController.java b/vid-app-common/src/main/java/org/onap/vid/controller/LoggerController.java
index 48677120d..7233a67e3 100644
--- a/vid-app-common/src/main/java/org/onap/vid/controller/LoggerController.java
+++ b/vid-app-common/src/main/java/org/onap/vid/controller/LoggerController.java
@@ -56,6 +56,7 @@ import org.springframework.web.bind.annotation.RestController;
public class LoggerController extends RestrictedBaseController {
private static final EELFLoggerDelegate LOGGER = EELFLoggerDelegate.getLogger(LoggerController.class);
+ public static final String VID_IS_STARTED = "VID is started";
private RoleProvider roleProvider;
private LogfilePathCreator logfilePathCreator;
@@ -90,7 +91,8 @@ public class LoggerController extends RestrictedBaseController {
return Streams.takeWhile(
Stream.generate(reverseLinesSupplier),
- line -> !StringUtils.contains(line, "Logging is started"))
+ line -> !StringUtils.contains(line, "Logging is started") &&
+ !StringUtils.contains(line, VID_IS_STARTED))
.limit(limit)
.limit(5_000)
.filter(Objects::nonNull)