Mercurial Hosting > luan
comparison 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 |
comparison
equal
deleted
inserted
replaced
375:e2e70d27c258 | 376:0a75ed73bccc |
---|---|
1 package luan.modules.logging; | |
2 | |
3 import org.apache.log4j.Logger; | |
4 import luan.Luan; | |
5 import luan.LuanState; | |
6 import luan.LuanException; | |
7 import luan.LuanTable; | |
8 import luan.LuanJavaFunction; | |
9 | |
10 | |
11 public final class LuanLogger { | |
12 private final Logger logger; | |
13 | |
14 public LuanLogger(Logger logger) { | |
15 this.logger = logger; | |
16 } | |
17 | |
18 public void error(LuanState luan,Object obj) throws LuanException { | |
19 logger.error( luan.toString(obj) ); | |
20 } | |
21 | |
22 public void warn(LuanState luan,Object obj) throws LuanException { | |
23 logger.warn( luan.toString(obj) ); | |
24 } | |
25 | |
26 public void info(LuanState luan,Object obj) throws LuanException { | |
27 logger.info( luan.toString(obj) ); | |
28 } | |
29 | |
30 public void debug(LuanState luan,Object obj) throws LuanException { | |
31 logger.debug( luan.toString(obj) ); | |
32 } | |
33 | |
34 } |