AbstractAccessLogValve.ElapsedTimeElement (Apache Tomcat 11.0.5 API Documentation)
Description: declaration: package: org.apache.catalina.valves, class: AbstractAccessLogValve, class: ElapsedTimeElement

# Class AbstractAccessLogValve.ElapsedTimeElement

java.lang.Object
org.apache.catalina.valves.AbstractAccessLogValve.ElapsedTimeElement

All Implemented Interfaces:
  `AbstractAccessLogValve.AccessLogElement`

Enclosing class:
  `AbstractAccessLogValve`

protected static class AbstractAccessLogValve.ElapsedTimeElement extends Object implements AbstractAccessLogValve.AccessLogElement
write time taken to process the request - %D, %T

Author:
  Craig R. McClanahan, Jason Brittain, Remy Maucherat, Takayuki Kaneko, Peter Rossbach

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ElapsedTimeElement(boolean micros, boolean millis)`
  `ElapsedTimeElement(org.apache.catalina.valves.AbstractAccessLogValve.ElapsedTimeElement.Style style)`
  Creates a new ElapsedTimeElement that will log the time in the specified style.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addElement(CharArrayWriter buf, Date date, Request request, Response response, long time)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ElapsedTimeElement

    public ElapsedTimeElement(org.apache.catalina.valves.AbstractAccessLogValve.ElapsedTimeElement.Style style)
    Creates a new ElapsedTimeElement that will log the time in the specified style.
    Parameters:
      `style` - The elapsed-time style to use.

  - ### ElapsedTimeElement

    public ElapsedTimeElement(boolean micros, boolean millis)
    Parameters:
      `micros` - `true`, write time in microseconds - %D
      `millis` - `true`, write time in milliseconds, if both arguments are `false`, write time in seconds - %T

- ## Method Details

  - ### addElement

    public void addElement(CharArrayWriter buf, Date date, Request request, Response response, long time)
    Specified by:
      `addElement` in interface `AbstractAccessLogValve.AccessLogElement`