1 29 30 package com.caucho.server.log; 31 32 import com.caucho.config.ConfigException; 33 import com.caucho.config.types.InitProgram; 34 import com.caucho.log.Log; 35 import com.caucho.vfs.Path; 36 37 import javax.servlet.ServletContext ; 38 import javax.servlet.ServletException ; 39 import javax.servlet.http.HttpServletRequest ; 40 import javax.servlet.http.HttpServletResponse ; 41 import java.io.IOException ; 42 import java.util.logging.Logger ; 43 44 47 abstract public class AbstractAccessLog { 48 protected static final Logger log = Log.open(AbstractAccessLog.class); 49 50 protected Path _path; 51 52 protected String _pathFormat; 53 54 57 public Path getPath() 58 { 59 return _path; 60 } 61 62 65 public void setPath(Path path) 66 { 67 _path = path; 68 } 69 70 73 public String getPathFormat() 74 { 75 return _pathFormat; 76 } 77 78 81 public void setPathFormat(String pathFormat) 82 throws ConfigException 83 { 84 _pathFormat = pathFormat; 85 } 86 87 90 public void setId(Path path) 91 { 92 setPath(path); 93 } 94 95 public void addInit(InitProgram init) 96 throws Throwable 97 { 98 init.init(this); 99 } 100 101 104 public void init() 105 throws ServletException , IOException 106 { 107 } 108 109 115 public abstract void log(HttpServletRequest request, 116 HttpServletResponse response, 117 ServletContext application) 118 throws IOException ; 119 120 123 public void flush() 124 { 125 } 126 127 130 public void destroy() 131 throws IOException 132 { 133 } 134 } 135 | Popular Tags |