
org.snapscript.studio.agent.log.ConsoleLog Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of snap-all Show documentation
Show all versions of snap-all Show documentation
Dynamic scripting for the JVM
package org.snapscript.studio.agent.log;
import java.io.PrintStream;
public class ConsoleLog implements Log{
private final PrintStream stream;
public ConsoleLog() {
this.stream = System.out;
}
@Override
public void log(LogLevel level, Object text) {
stream.println(text);
}
@Override
public void log(LogLevel level, Object text, Throwable cause) {
stream.print(text);
if(cause != null) {
stream.print(": ");
cause.printStackTrace(stream);
}else {
stream.println();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy