Skip to content

Commit

Permalink
Added white space to stream writing logger.
Browse files Browse the repository at this point in the history
  • Loading branch information
raphw committed Jun 1, 2016
1 parent 985a562 commit 1e083a5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Expand Up @@ -1346,23 +1346,23 @@ public static Listener toSystemError() {

@Override
public void onTransformation(TypeDescription typeDescription, ClassLoader classLoader, JavaModule module, DynamicType dynamicType) {
printStream.println(PREFIX + " TRANSFORM " + typeDescription.getName() + "[" + classLoader + "," + module + "]");
printStream.println(PREFIX + " TRANSFORM " + typeDescription.getName() + "[" + classLoader + ", " + module + "]");
}

@Override
public void onIgnored(TypeDescription typeDescription, ClassLoader classLoader, JavaModule module) {
printStream.println(PREFIX + " IGNORE " + typeDescription.getName() + "[" + classLoader + "," + module + "]");
printStream.println(PREFIX + " IGNORE " + typeDescription.getName() + "[" + classLoader + ", " + module + "]");
}

@Override
public void onError(String typeName, ClassLoader classLoader, JavaModule module, Throwable throwable) {
printStream.println(PREFIX + " ERROR " + typeName + "[" + classLoader + "," + module + "]");
printStream.println(PREFIX + " ERROR " + typeName + "[" + classLoader + ", " + module + "]");
throwable.printStackTrace(printStream);
}

@Override
public void onComplete(String typeName, ClassLoader classLoader, JavaModule module) {
printStream.println(PREFIX + " COMPLETE " + typeName + "[" + classLoader + "," + module + "]");
printStream.println(PREFIX + " COMPLETE " + typeName + "[" + classLoader + ", " + module + "]");
}

@Override
Expand Down
Expand Up @@ -112,7 +112,7 @@ public void testStreamWritingOnTransformation() throws Exception {
PrintStream printStream = mock(PrintStream.class);
AgentBuilder.Listener listener = new AgentBuilder.Listener.StreamWriting(printStream);
listener.onTransformation(typeDescription, classLoader, module, dynamicType);
verify(printStream).println("[Byte Buddy] TRANSFORM " + FOO + "[" + classLoader + "," + module + "]");
verify(printStream).println("[Byte Buddy] TRANSFORM " + FOO + "[" + classLoader + ", " + module + "]");
verifyNoMoreInteractions(printStream);
}

Expand All @@ -121,7 +121,7 @@ public void testStreamWritingOnError() throws Exception {
PrintStream printStream = mock(PrintStream.class);
AgentBuilder.Listener listener = new AgentBuilder.Listener.StreamWriting(printStream);
listener.onError(FOO, classLoader, module, throwable);
verify(printStream).println("[Byte Buddy] ERROR " + FOO + "[" + classLoader + "," + module + "]");
verify(printStream).println("[Byte Buddy] ERROR " + FOO + "[" + classLoader + ", " + module + "]");
verifyNoMoreInteractions(printStream);
verify(throwable).printStackTrace(printStream);
verifyNoMoreInteractions(throwable);
Expand All @@ -132,7 +132,7 @@ public void testStreamWritingOnComplete() throws Exception {
PrintStream printStream = mock(PrintStream.class);
AgentBuilder.Listener listener = new AgentBuilder.Listener.StreamWriting(printStream);
listener.onComplete(FOO, classLoader, module);
verify(printStream).println("[Byte Buddy] COMPLETE " + FOO + "[" + classLoader + "," + module + "]");
verify(printStream).println("[Byte Buddy] COMPLETE " + FOO + "[" + classLoader + ", " + module + "]");
verifyNoMoreInteractions(printStream);
}

Expand All @@ -141,7 +141,7 @@ public void testStreamWritingOnIgnore() throws Exception {
PrintStream printStream = mock(PrintStream.class);
AgentBuilder.Listener listener = new AgentBuilder.Listener.StreamWriting(printStream);
listener.onIgnored(typeDescription, classLoader, module);
verify(printStream).println("[Byte Buddy] IGNORE " + FOO + "[" + classLoader + "," + module + "]");
verify(printStream).println("[Byte Buddy] IGNORE " + FOO + "[" + classLoader + ", " + module + "]");
verifyNoMoreInteractions(printStream);
}

Expand Down

0 comments on commit 1e083a5

Please sign in to comment.