Mercurial Hosting > luan
diff src/luan/Luan.java @ 1454:219f2b937f2b
remove log4j
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 08 Mar 2020 14:11:30 -0600 |
parents | bbc41b305935 |
children | 465b4a0dae4a |
line wrap: on
line diff
--- a/src/luan/Luan.java Mon Mar 02 15:09:10 2020 -0700 +++ b/src/luan/Luan.java Sun Mar 08 14:11:30 2020 -0600 @@ -1,6 +1,6 @@ package luan; -import java.lang.reflect.Array; +import java.lang.reflect.Array; import java.io.IOException; import java.util.List; import java.util.ArrayList; @@ -163,31 +163,27 @@ return null; } - public Logger getLogger(Class cls) { - return LuanLogger.getLogger(this,cls); - } - // static public static void main(String[] args) throws LuanException { - Luan luan = new Luan(); + Luan luan = new Luan(); LuanFunction fn = loadClasspath(luan,"luan/cmd_line.luan"); fn.call((Object[])args); } - - public static LuanFunction loadClasspath(Luan luan,String classpath) - throws LuanException - { + + public static LuanFunction loadClasspath(Luan luan,String classpath) + throws LuanException + { try { - String src = IoLuan.classpath(luan,classpath).read_text(); - return luan.load(src,"classpath:"+classpath,true); - } catch(IOException e) { - throw new RuntimeException(e); + String src = IoLuan.classpath(luan,classpath).read_text(); + return luan.load(src,"classpath:"+classpath,true); + } catch(IOException e) { + throw new RuntimeException(e); } } - + public static Object first(Object obj) { if( !(obj instanceof Object[]) ) return obj;