org.eclipse.jetty.server

Class NCSARequestLog

    • Constructor Detail

      • NCSARequestLog

        public NCSARequestLog()
        Create request log object with default settings.
      • NCSARequestLog

        public NCSARequestLog(String filename)
        Create request log object with specified output file name.
        Parameters:
        filename - the file name for the request log. This may be in the format expected by RolloverFileOutputStream
    • Method Detail

      • setFilename

        public void setFilename(String filename)
        Set the output file name of the request log. The file name may be in the format expected by RolloverFileOutputStream.
        Parameters:
        filename - file name of the request log
      • getFilename

        public String getFilename()
        Retrieve the output file name of the request log.
        Returns:
        file name of the request log
      • getDatedFilename

        public String getDatedFilename()
        Retrieve the file name of the request log with the expanded date wildcard if the output is written to the disk using RolloverFileOutputStream.
        Returns:
        file name of the request log, or null if not applicable
      • setLogDateFormat

        public void setLogDateFormat(String format)
        Set the timestamp format for request log entries in the file. If this is not set, the pre-formated request timestamp is used.
        Parameters:
        format - timestamp format string
      • getLogDateFormat

        public String getLogDateFormat()
        Retrieve the timestamp format string for request log entries.
        Returns:
        timestamp format string.
      • setLogLocale

        public void setLogLocale(Locale logLocale)
        Set the locale of the request log.
        Parameters:
        logLocale - locale object
      • getLogLocale

        public Locale getLogLocale()
        Retrieve the locale of the request log.
        Returns:
        locale object
      • setLogTimeZone

        public void setLogTimeZone(String tz)
        Set the timezone of the request log.
        Parameters:
        tz - timezone string
      • getLogTimeZone

        public String getLogTimeZone()
        Retrieve the timezone of the request log.
        Returns:
        timezone string
      • setRetainDays

        public void setRetainDays(int retainDays)
        Set the number of days before rotated log files are deleted.
        Parameters:
        retainDays - number of days to keep a log file
      • getRetainDays

        public int getRetainDays()
        Retrieve the number of days before rotated log files are deleted.
        Returns:
        number of days to keep a log file
      • setExtended

        public void setExtended(boolean extended)
        Set the extended request log format flag.
        Parameters:
        extended - true - log the extended request information, false - do not log the extended request information
      • isExtended

        public boolean isExtended()
        Retrieve the extended request log format flag.
        Returns:
        value of the flag
      • setAppend

        public void setAppend(boolean append)
        Set append to log flag.
        Parameters:
        append - true - request log file will be appended after restart, false - request log file will be overwritten after restart
      • isAppend

        public boolean isAppend()
        Retrieve append to log flag.
        Returns:
        value of the flag
      • setIgnorePaths

        public void setIgnorePaths(String[] ignorePaths)
        Set request paths that will not be logged.
        Parameters:
        ignorePaths - array of request paths
      • getIgnorePaths

        public String[] getIgnorePaths()
        Retrieve the request paths that will not be logged.
        Returns:
        array of request paths
      • setLogCookies

        public void setLogCookies(boolean logCookies)
        Controls logging of the request cookies.
        Parameters:
        logCookies - true - values of request cookies will be logged, false - values of request cookies will not be logged
      • getLogCookies

        public boolean getLogCookies()
        Retrieve log cookies flag
        Returns:
        value of the flag
      • setLogServer

        public void setLogServer(boolean logServer)
        Controls logging of the request hostname.
        Parameters:
        logServer - true - request hostname will be logged, false - request hostname will not be logged
      • getLogServer

        public boolean getLogServer()
        Retrieve log hostname flag.
        Returns:
        value of the flag
      • setLogLatency

        public void setLogLatency(boolean logLatency)
        Controls logging of request processing time.
        Parameters:
        logLatency - true - request processing time will be logged false - request processing time will not be logged
      • getLogLatency

        public boolean getLogLatency()
        Retrieve log request processing time flag.
        Returns:
        value of the flag
      • setPreferProxiedForAddress

        public void setPreferProxiedForAddress(boolean preferProxiedForAddress)
        Controls whether the actual IP address of the connection or the IP address from the X-Forwarded-For header will be logged.
        Parameters:
        preferProxiedForAddress - true - IP address from header will be logged, false - IP address from the connection will be logged
      • getPreferProxiedForAddress

        public boolean getPreferProxiedForAddress()
        Retrieved log X-Forwarded-For IP address flag.
        Returns:
        value of the flag
      • getFilenameDateFormat

        public String getFilenameDateFormat()
        Retrieve the file name date format string.
        Returns:
        the log File Date Format
      • setLogDispatch

        public void setLogDispatch(boolean value)
        Controls logging of the request dispatch time
        Parameters:
        value - true - request dispatch time will be logged false - request dispatch time will not be logged
      • isLogDispatch

        public boolean isLogDispatch()
        Retrieve request dispatch time logging flag
        Returns:
        value of the flag
      • logExtended

        protected void logExtended(Request request,               Response response,               StringBuilder b)                    throws IOException
        Writes extended request and response information to the output stream.
        Parameters:
        request - request object
        response - response object
        b - StringBuilder to write to
        Throws:
        IOException

Copyright © 1995-2013 Mort Bay Consulting. All Rights Reserved.



NOTHING
NOTHING
Add the Maven Dependecy to your project: maven dependecy for com.amazonaws : aws-java-sdk : 1.3.14