X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fjavascript%2Flog4j%2FSimpleLayout.java;fp=src%2Fjalview%2Fjavascript%2Flog4j%2FSimpleLayout.java;h=9e5cbbab587f46390cb569b3ac53ee5b6d51d9e9;hb=ec8f3cedf60fb1feed6d34de6b49f6bfa78b9dd8;hp=0000000000000000000000000000000000000000;hpb=056dad85a910551cc95e44d451a61f6b8c4dd35d;p=jalview.git diff --git a/src/jalview/javascript/log4j/SimpleLayout.java b/src/jalview/javascript/log4j/SimpleLayout.java new file mode 100644 index 0000000..9e5cbba --- /dev/null +++ b/src/jalview/javascript/log4j/SimpleLayout.java @@ -0,0 +1,55 @@ +/* + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors + * + * This file is part of Jalview. + * + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ +package jalview.javascript.log4j; + +import jalview.javascript.log4j.spi.LoggingEvent; + +public class SimpleLayout extends Layout +{ + + StringBuffer sbuf = new StringBuffer(128); + + @Override + public void activateOptions() + { + // TODO Auto-generated method stub + + } + + @Override + public String format(LoggingEvent event) + { + + sbuf.setLength(0); + sbuf.append(event.getLevel().toString()); + sbuf.append(" - "); + sbuf.append(event.getRenderedMessage()); + sbuf.append(LINE_SEP); + return sbuf.toString(); + } + @Override + public boolean ignoresThrowable() + { + // TODO Auto-generated method stub + return false; + } + +}