Skip to content

Commit

Permalink
Merge pull request #2234 from zebrunner/develop
Browse files Browse the repository at this point in the history
1.1.5
  • Loading branch information
vdelendik authored Sep 11, 2023
2 parents c7722d0 + 517b2e6 commit ffc5c83
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>11</java.version>
<carina-webdriver.version>1.1.6</carina-webdriver.version>
<carina-webdriver.version>1.1.7</carina-webdriver.version>
<!-- Logging -->
<slf4j.version>1.7.30</slf4j.version>
<log4j.version>2.17.1</log4j.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,15 @@ public CarinaListener() {
org.apache.logging.log4j.core.config.Configuration config = ctx.getConfiguration();
LoggerConfig logger = config.getLoggerConfig("com.zebrunner.carina.core");
logger.setLevel(Level.getLevel(Configuration.getRequired(ReportConfiguration.Parameter.CORE_LOG_LEVEL)));
}

if ("DEBUG".equalsIgnoreCase(Configuration.getRequired(ReportConfiguration.Parameter.CORE_LOG_LEVEL))) {
config.getLoggerConfig("io.netty")
.setLevel(Level.OFF);
config.getLoggerConfig("org.asynchttpclient.netty")
.setLevel(Level.OFF);
}
}

try {
L10N.load();
} catch (Exception e) {
Expand Down Expand Up @@ -214,6 +221,10 @@ public void onStart(ISuite suite) {

// register owner of the run
registerOwner();

// register branch if available
Configuration.get("branch")
.ifPresent(branch -> Label.attachToTestRun("Branch", branch));

/*
* To support multi-suite declaration as below we have to init test run labels at once only!
Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/config.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ retry_count=0
thread_count=-1
data_provider_thread_count=-1
test_run_rules=NULL
#============ Other Parameters ==============#
#Note: this parameters should not be added to the Configuration classes
branch=NULL
12 changes: 11 additions & 1 deletion src/main/resources/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,22 @@
</ReportingAppender>
</appenders>
<loggers>
<!-- there are a lot of useless warnings from Reflections -->
<!-- there are a lot of useless logs from Reflections -->
<logger name="org.reflections" level="WARN" additivity="false">
<appender-ref ref="Console"/>
<appender-ref ref="ThreadLogAppender"/>
<appender-ref ref="ReportingAppender"/>
</logger>
<logger name="io.netty" additivity="false">
<appender-ref ref="Console"/>
<appender-ref ref="ThreadLogAppender"/>
<appender-ref ref="ReportingAppender"/>
</logger>
<logger name="org.asynchttpclient.netty" additivity="false">
<appender-ref ref="Console"/>
<appender-ref ref="ThreadLogAppender"/>
<appender-ref ref="ReportingAppender"/>
</logger>
<root level="info">
<appender-ref ref="Console"/>
<appender-ref ref="ThreadLogAppender"/>
Expand Down

0 comments on commit ffc5c83

Please sign in to comment.