Results 1 to 2 of 2

Thread: I need to configure the access log format

Hybrid View

  1. #1

    Default I need to configure the access log format

    Is it possible to change the format of the access log on the dm server.

    Right now we are logging the ip address of the load balancers so I need to log our "LB_REMOTE_HOST" or "X_FORWARDED_FOR" instead of the standard "REMOTE_ADDR"

    I changed the accessLogFormat var in servletContainer.config to a stadard tomcat format %{X-Forwarded-For}i %l %u %t "%r" %s %b but it didn't work.

    Is this just not possible on the dm server? I can setup our LBs to pass the ip address as usual but we loose the multiplexing which I don't want to do.

    Thanks,
    Andy

  2. #2
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    You can configure AccessLogValve in config/servlet/context.xml
    Code:
    <Valve className="org.apache.catalina.valves.AccessLogValve"
    directory="../../serviceability/logs/access"
    prefix="MyFancyAccessLogs." suffix=".log"  pattern="%a %A %{X-
    FORWARDED-FOR}i"/>
    Currently there is nothing in servletCotainer.config

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •