Mercurial Hosting > luan
diff src/luan/modules/logging/LuanLogger.java @ 1333:25746915a241
merge Luan and LuanState
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 12 Feb 2019 22:33:40 -0700 |
parents | 11b7e11f9ed5 |
children | c88b486a9511 |
line wrap: on
line diff
--- a/src/luan/modules/logging/LuanLogger.java Tue Feb 12 21:50:26 2019 -0700 +++ b/src/luan/modules/logging/LuanLogger.java Tue Feb 12 22:33:40 2019 -0700 @@ -2,37 +2,37 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import luan.LuanState; +import luan.Luan; import luan.LuanException; public final class LuanLogger { private final Logger logger; - public LuanLogger(LuanState luan,String name) { + public LuanLogger(Luan luan,String name) { this.logger = getLogger(luan,name); } - public void error(LuanState luan,Object obj) throws LuanException { + public void error(Luan luan,Object obj) throws LuanException { logger.error( luan.toString(obj) ); } - public void warn(LuanState luan,Object obj) throws LuanException { + public void warn(Luan luan,Object obj) throws LuanException { logger.warn( luan.toString(obj) ); } - public void info(LuanState luan,Object obj) throws LuanException { + public void info(Luan luan,Object obj) throws LuanException { logger.info( luan.toString(obj) ); } - public void debug(LuanState luan,Object obj) throws LuanException { + public void debug(Luan luan,Object obj) throws LuanException { logger.debug( luan.toString(obj) ); } - private static ThreadLocal<LuanState> tl = new ThreadLocal<LuanState>(); + private static ThreadLocal<Luan> tl = new ThreadLocal<Luan>(); - public static Logger getLogger(LuanState luan,String name) { + public static Logger getLogger(Luan luan,String name) { try { luan.require("luan:logging/Logging.luan"); // ensure initialization } catch(LuanException e) { @@ -46,7 +46,7 @@ } } - public static LuanState luan() { + public static Luan luan() { return tl.get(); } }