Skip to content

Commit

Permalink
Merge pull request #587 from authorjapps/PR-588_fixes
Browse files Browse the repository at this point in the history
PR-580 More prettyfied logging for a Scenario
  • Loading branch information
authorjapps authored Sep 29, 2023
2 parents 1fd1bed + e0cdbfa commit b117d71
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ private Object readJsonPathOrElseNull(String requestJson, String jsonPath) {
try {
return JsonPath.read(requestJson, jsonPath);
} catch (PathNotFoundException pEx) {
LOGGER.warn("No " + jsonPath + " was present in the request. returned null.");
LOGGER.info("No " + jsonPath + " was present in the request. returned null.");
return null;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ public class ZeroCodeMultiStepsScenarioRunnerImpl implements ZeroCodeMultiStepsS
@Override
public synchronized boolean runScenario(ScenarioSpec scenario, RunNotifier notifier, Description description) {

LOGGER.warn("\n-------------------------- BDD: Scenario:{} -------------------------\n", scenario.getScenarioName());
LOGGER.warn("\n-----------------------------------------------------------------------------------\n" +
"\nScenario:\n+++++++++\n\n{} \n" +
"\n-----------------------------------------------------------------------------------",
scenario.getScenarioName());

ioWriterBuilder = ZeroCodeIoWriteBuilder.newInstance().timeStamp(LocalDateTime.now());

Expand Down
2 changes: 1 addition & 1 deletion http-testing/src/test/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</layout>
</appender>

<root level="INFO"> <!-- Change this value to have or prevent verbose outputs e.g. WARN or DEBUG -->
<root level="WARN"> <!-- Update this value to see or prevent verbose outputs -->
<appender-ref ref="fileAppender" />
<appender-ref ref="consoleAppender" />
</root>
Expand Down
23 changes: 23 additions & 0 deletions kafka-testing/src/test/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="fileAppender" class="ch.qos.logback.core.FileAppender">
<file>target/logs/sponsorship_ingestion.log</file>
<append>true</append>
<encoder>
<!-- make it 100 to print full package -->
<pattern>%d [%thread] %-5level %logger{30} - %msg%n</pattern>
</encoder>
</appender>

<appender name="consoleAppender" class="ch.qos.logback.core.ConsoleAppender">
<layout class="ch.qos.logback.classic.PatternLayout">
<pattern>%d [%thread] %-5level %logger{30} - %msg%n</pattern>
</layout>
</appender>

<!-- Update level to DEBUG or INFO to get more detailed operations -->
<root level="WARN">
<appender-ref ref="fileAppender" />
<appender-ref ref="consoleAppender" />
</root>
</configuration>

0 comments on commit b117d71

Please sign in to comment.