Mercurial Hosting > luan
changeset 627:a98812908fbc
add loggerRoot param to LuanHandler
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 18 Jan 2016 05:50:24 -0700 |
parents | 53a50c70c5e2 |
children | 6510de302f95 |
files | http/src/luan/modules/http/LuanHandler.java http/src/luan/modules/http/NotFound.java |
diffstat | 2 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/http/src/luan/modules/http/LuanHandler.java Sun Jan 17 06:19:46 2016 -0700 +++ b/http/src/luan/modules/http/LuanHandler.java Mon Jan 18 05:50:24 2016 -0700 @@ -14,12 +14,15 @@ public class LuanHandler extends AbstractHandler { - private static final Logger logger = LoggerFactory.getLogger(LuanHandler.class); private final LuanState luan; + private final Logger logger; private String welcomeFile = "index.html"; - public LuanHandler(LuanState luan) { + public LuanHandler(LuanState luan,String loggerRoot) { this.luan = luan; + if( loggerRoot==null ) + loggerRoot = ""; + logger = LoggerFactory.getLogger(loggerRoot+LuanHandler.class.getName()); } @Override public void handle(String target,Request baseRequest,HttpServletRequest request,HttpServletResponse response)
--- a/http/src/luan/modules/http/NotFound.java Sun Jan 17 06:19:46 2016 -0700 +++ b/http/src/luan/modules/http/NotFound.java Mon Jan 18 05:50:24 2016 -0700 @@ -9,8 +9,8 @@ public class NotFound extends LuanHandler { - public NotFound(LuanState luan) { - super(luan); + public NotFound(LuanState luan,String loggerRoot) { + super(luan,loggerRoot); } @Override public void handle(String target,Request baseRequest,HttpServletRequest request,HttpServletResponse response)