Add more HTTP log (#2458)

This commit is contained in:
kangkaisen
2019-12-13 21:31:48 +08:00
committed by ZHAO Chun
parent a17b28ccc1
commit 02c4edb98e
3 changed files with 4 additions and 1 deletions

View File

@ -309,6 +309,8 @@ public abstract class BaseAction implements IAction {
throws UnauthorizedException {
ActionAuthorizationInfo authInfo = new ActionAuthorizationInfo();
if (!parseAuthInfo(request, authInfo)) {
LOG.info("parse auth info failed, Authorization header {}, url {}",
request.getAuthorizationHeader(), request.getRequest().uri());
throw new UnauthorizedException("Need auth information.");
}
LOG.debug("get auth info: {}", authInfo);

View File

@ -88,7 +88,7 @@ public class LoadAction extends RestBaseAction {
}
String tableName = request.getSingleParameter(TABLE_KEY);
if (Strings.isNullOrEmpty(dbName)) {
if (Strings.isNullOrEmpty(tableName)) {
throw new DdlException("No table selected.");
}

View File

@ -49,6 +49,7 @@ public class RestBaseAction extends BaseAction {
@Override
public void handleRequest(BaseRequest request) throws Exception {
LOG.info("receive http request. url={}", request.getRequest().uri());
BaseResponse response = new BaseResponse();
try {
execute(request, response);