Mercurial Hosting > luan
comparison http/src/luan/modules/http/LuanHandler.java @ 627:a98812908fbc
add loggerRoot param to LuanHandler
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 18 Jan 2016 05:50:24 -0700 |
parents | f99c79b0b426 |
children | ca169567ce07 |
comparison
equal
deleted
inserted
replaced
626:53a50c70c5e2 | 627:a98812908fbc |
---|---|
12 import luan.LuanState; | 12 import luan.LuanState; |
13 import luan.LuanException; | 13 import luan.LuanException; |
14 | 14 |
15 | 15 |
16 public class LuanHandler extends AbstractHandler { | 16 public class LuanHandler extends AbstractHandler { |
17 private static final Logger logger = LoggerFactory.getLogger(LuanHandler.class); | |
18 private final LuanState luan; | 17 private final LuanState luan; |
18 private final Logger logger; | |
19 private String welcomeFile = "index.html"; | 19 private String welcomeFile = "index.html"; |
20 | 20 |
21 public LuanHandler(LuanState luan) { | 21 public LuanHandler(LuanState luan,String loggerRoot) { |
22 this.luan = luan; | 22 this.luan = luan; |
23 if( loggerRoot==null ) | |
24 loggerRoot = ""; | |
25 logger = LoggerFactory.getLogger(loggerRoot+LuanHandler.class.getName()); | |
23 } | 26 } |
24 | 27 |
25 @Override public void handle(String target,Request baseRequest,HttpServletRequest request,HttpServletResponse response) | 28 @Override public void handle(String target,Request baseRequest,HttpServletRequest request,HttpServletResponse response) |
26 throws IOException | 29 throws IOException |
27 { | 30 { |