001// *************************************************************************************************************************** 002// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file * 003// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * 004// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance * 005// * with the License. You may obtain a copy of the License at * 006// * * 007// * http://www.apache.org/licenses/LICENSE-2.0 * 008// * * 009// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an * 010// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * 011// * specific language governing permissions and limitations under the License. * 012// *************************************************************************************************************************** 013package org.apache.juneau.rest; 014 015import javax.servlet.http.*; 016 017/** 018 * Interface class used for logging HTTP requests to the log file. 019 * 020 * <ul class='seealso'> 021 * <li class='jf'>{@link RestContext#REST_callLogger} 022 * <li class='link'>{@doc RestLoggingAndDebugging} 023 * </ul> 024 */ 025public interface RestCallLogger { 026 027 /** 028 * Represents no RestLogger. 029 * 030 * <p> 031 * Used on annotation to indicate that the value should be inherited from the parent class, and 032 * ultimately {@link BasicRestCallLogger} if not specified at any level. 033 */ 034 public interface Null extends RestCallLogger {} 035 036 /** 037 * Called at the end of a servlet request to log the request. 038 * 039 * @param config The logging configuration. 040 * @param req The servlet request. 041 * @param res The servlet response. 042 */ 043 public void log(RestCallLoggerConfig config, HttpServletRequest req, HttpServletResponse res); 044}