JAL-3541 selectively merged build.gradle and gradle.properties
[jalview.git] / src / jalview / javascript / log4j / SimpleLayout.java
diff --git a/src/jalview/javascript/log4j/SimpleLayout.java b/src/jalview/javascript/log4j/SimpleLayout.java
new file mode 100644 (file)
index 0000000..9e5cbba
--- /dev/null
@@ -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 <http://www.gnu.org/licenses/>.
+ * 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;
+  }
+
+}