diff logging/src/luan/modules/logging/LuanLogger.java @ 376:0a75ed73bccc

partly revert rev 538c19ad1272 (logging)
author Franklin Schmidt <fschmidt@gmail.com>
date Sat, 18 Apr 2015 19:57:42 -0600
parents
children f1601a4ce1aa
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/logging/src/luan/modules/logging/LuanLogger.java	Sat Apr 18 19:57:42 2015 -0600
@@ -0,0 +1,34 @@
+package luan.modules.logging;
+
+import org.apache.log4j.Logger;
+import luan.Luan;
+import luan.LuanState;
+import luan.LuanException;
+import luan.LuanTable;
+import luan.LuanJavaFunction;
+
+
+public final class LuanLogger {
+	private final Logger logger;
+
+	public LuanLogger(Logger logger) {
+		this.logger = logger;
+	}
+
+	public void error(LuanState luan,Object obj) throws LuanException {
+		logger.error( luan.toString(obj) );
+	}
+
+	public void warn(LuanState luan,Object obj) throws LuanException {
+		logger.warn( luan.toString(obj) );
+	}
+
+	public void info(LuanState luan,Object obj) throws LuanException {
+		logger.info( luan.toString(obj) );
+	}
+
+	public void debug(LuanState luan,Object obj) throws LuanException {
+		logger.debug( luan.toString(obj) );
+	}
+
+}