JAL-3746 apply copyright to source
[jalview.git] / src / jalview / log / JLoggerLog4j.java
index ca24e30..22f3a55 100644 (file)
@@ -1,3 +1,23 @@
+/*
+ * 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.log;
 
 import org.apache.logging.log4j.Logger;
@@ -10,6 +30,16 @@ public class JLoggerLog4j extends JLogger implements JLoggerI
 {
   private Logger logger = null;
 
+  public static JLoggerLog4j getLogger(Class c)
+  {
+    return getLogger(c);
+  }
+
+  public static JLoggerLog4j getLogger(Class c, LogLevel loglevel)
+  {
+    return getLogger(c.getCanonicalName(), loglevel);
+  }
+
   public static JLoggerLog4j getLogger(String name)
   {
     return getLogger(name, LogLevel.INFO);
@@ -23,7 +53,6 @@ public class JLoggerLog4j extends JLogger implements JLoggerI
 
   private JLoggerLog4j(String name, LogLevel level)
   {
-    // super(name, level);
     this.name = name;
     this.level = level;
     this.loggerSetup();
@@ -120,11 +149,11 @@ public class JLoggerLog4j extends JLogger implements JLoggerI
     return this.logger;
   }
 
-  public synchronized static void addAppender(JLoggerLog4j l1,
+  public synchronized static void addAppender(JLoggerLog4j level,
           Appender appender)
   {
     if (!Platform.isJS())
-      Log4j.addAppender(l1.getLoggerObject(), appender);
+      Log4j.addAppender(level.getLoggerObject(), appender);
   }
 
   public synchronized static void addAppender(JLoggerLog4j l1,