Mercurial Hosting > luan
comparison src/luan/host/WebHandler.java @ 1332:11b7e11f9ed5
cleaner logging
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 12 Feb 2019 21:50:26 -0700 |
parents | f41919741100 |
children | 25746915a241 |
comparison
equal
deleted
inserted
replaced
1331:02fe660e7748 | 1332:11b7e11f9ed5 |
---|---|
13 import luan.LuanTable; | 13 import luan.LuanTable; |
14 import luan.LuanFunction; | 14 import luan.LuanFunction; |
15 import luan.LuanClosure; | 15 import luan.LuanClosure; |
16 import luan.modules.BasicLuan; | 16 import luan.modules.BasicLuan; |
17 import luan.modules.http.LuanHandler; | 17 import luan.modules.http.LuanHandler; |
18 import luan.modules.logging.LuanLogger; | 18 import luan.modules.logging.Log4j; |
19 | 19 |
20 | 20 |
21 public class WebHandler implements Handler { | 21 public class WebHandler implements Handler { |
22 private static final Logger logger = LoggerFactory.getLogger(WebHandler.class); | 22 private static final Logger logger = LoggerFactory.getLogger(WebHandler.class); |
23 | 23 |
39 String logDir = dirStr + "/site/private/local/logs/web"; | 39 String logDir = dirStr + "/site/private/local/logs/web"; |
40 new File(logDir).mkdirs(); | 40 new File(logDir).mkdirs(); |
41 | 41 |
42 LuanState luan = new LuanState(); | 42 LuanState luan = new LuanState(); |
43 try { | 43 try { |
44 LuanLogger.newLoggerRepository(luan); | 44 Log4j.newLoggerRepository(luan); |
45 } catch(LuanException e) { | 45 } catch(LuanException e) { |
46 throw new RuntimeException(e); | 46 throw new RuntimeException(e); |
47 } | 47 } |
48 initLuan(luan,dirStr,domain,true); | 48 initLuan(luan,dirStr,domain,true); |
49 return new LuanHandler(luan); | 49 return new LuanHandler(luan); |