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

Log information in seperate line in log4j. #2936

Open
wants to merge 1 commit 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
18 changes: 16 additions & 2 deletions testng-core-api/src/main/java/org/testng/log4testng/Logger.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public static Logger getLogger(Class<?> pClass) {
* @return true if this logger is enabled for level TRACE, false otherwise.
*/
public boolean isTraceEnabled() {
System.lineSeparator();
return logger.isTraceEnabled();
}

Expand All @@ -49,6 +50,7 @@ public boolean isTraceEnabled() {
* @param message the message object to log.
*/
public void trace(Object message) {
System.lineSeparator();
logger.trace("{}", message);
}

Expand All @@ -60,6 +62,7 @@ public void trace(Object message) {
* @param t the exception to log, including its stack trace.
*/
public void trace(Object message, Throwable t) {
System.lineSeparator();
logger.trace("{}", message, t);
}

Expand All @@ -69,6 +72,7 @@ public void trace(Object message, Throwable t) {
* @return true if this logger is enabled for level DEBUG, false otherwise.
*/
public boolean isDebugEnabled() {
System.lineSeparator();
return logger.isDebugEnabled();
}

Expand All @@ -79,6 +83,7 @@ public boolean isDebugEnabled() {
* @param message the message object to log.
*/
public void debug(Object message) {
System.lineSeparator();
logger.debug("{}", message);
}

Expand All @@ -90,6 +95,7 @@ public void debug(Object message) {
* @param t the exception to log, including its stack trace.
*/
public void debug(Object message, Throwable t) {
System.lineSeparator();
logger.debug("{}", message, t);
}

Expand All @@ -99,6 +105,7 @@ public void debug(Object message, Throwable t) {
* @return true if this logger is enabled for level INFO, false otherwise.
*/
public boolean isInfoEnabled() {

return logger.isInfoEnabled();
}

Expand All @@ -109,7 +116,8 @@ public boolean isInfoEnabled() {
* @param message the message object to log.
*/
public void info(Object message) {
logger.info("{}", message);
System.lineSeparator();
logger.info("{} ", message);
}

/**
Expand All @@ -120,7 +128,8 @@ public void info(Object message) {
* @param t the exception to log, including its stack trace.
*/
public void info(Object message, Throwable t) {
logger.info("{}", message, t);
System.lineSeparator();
logger.info("{} ", message, t);
}

/**
Expand All @@ -130,6 +139,7 @@ public void info(Object message, Throwable t) {
* @param message the message object to log.
*/
public void warn(Object message) {
System.lineSeparator();
logger.warn("{}", message);
}

Expand All @@ -141,6 +151,7 @@ public void warn(Object message) {
* @param t the exception to log, including its stack trace.
*/
public void warn(Object message, Throwable t) {
System.lineSeparator();
logger.warn("{}", message, t);
}

Expand All @@ -151,6 +162,7 @@ public void warn(Object message, Throwable t) {
* @param message the message object to log.
*/
public void error(Object message) {
System.lineSeparator();
logger.error("{}", message);
}

Expand All @@ -162,6 +174,7 @@ public void error(Object message) {
* @param t the exception to log, including its stack trace.
*/
public void error(Object message, Throwable t) {
System.lineSeparator();
logger.error("{}", message, t);
}

Expand All @@ -172,6 +185,7 @@ public void error(Object message, Throwable t) {
* @param message the message object to log.
*/
public void fatal(Object message) {
System.lineSeparator();
logger.error("{}", message);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,17 @@
*/
public interface ITestResultNotifier {




Set<ITestResult> getPassedTests(ITestNGMethod tm);

Set<ITestResult> getFailedTests(ITestNGMethod tm);

Set<ITestResult> getSkippedTests(ITestNGMethod tm);




void addPassedTest(ITestNGMethod tm, ITestResult tr);

Expand Down