Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add slfj-simple and flag -i to view logs #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ repositories {

dependencies {
api 'com.epam.jdi:jdi-light-html:+'
testImplementation 'org.slf4j:slf4j-jdk14:2.0.9'
testImplementation 'io.qameta.allure:allure-testng:2.23.0'
testImplementation 'org.testng:testng:7.8.0'
testImplementation 'io.netty:netty-transport-native-epoll:4.1.78.Final'
Expand Down Expand Up @@ -48,4 +49,6 @@ tasks.withType(Javadoc) {

tasks.named('test') {
useTestNG()
outputs.upToDateWhen { false }
testLogging.showStandardStreams = true
}
14 changes: 1 addition & 13 deletions src/test/resources/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<Properties>
<Property name="logFileName">jdiEvents</Property>
<Property name="baseDir">./target/.logs</Property>
<Property name="baseDir">./build/.logs</Property>
</Properties>

<Appenders>
Expand All @@ -30,32 +30,20 @@
</Delete>
</DefaultRolloverStrategy>
</RollingFile>

<RollingFile name="htmlFileLogger" fileName="${baseDir}/app-info.html"
filePattern="${baseDir}/app-info-%d{yyyy-MM-dd}.html">
<HTMLLayout charset="UTF-8" title="Info Logs" locationInfo="true"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="10 MB"/>
</Policies>
</RollingFile>
</Appenders>


<Loggers>
<!-- Every configuration must have a root logger. If one is not configured the default root LoggerConfig is ERROR with Console appender attached. -->
<Root level="INFO">
<AppenderRef ref="fileAppender"/>
<AppenderRef ref="htmlFileLogger"/>
<AppenderRef ref="consoleAppender"/>
</Root>

<!-- additivity means, that parent-logger (in every case the root-logger) will also get the chance to log this stuff -->
<Logger name="JDI" additivity="FALSE" level="INFO">
<AppenderRef ref="fileAppender"/>
<AppenderRef ref="htmlFileLogger"/>
<AppenderRef ref="consoleAppender"/>
</Logger>

</Loggers>
</Configuration>