Enable Jetty basic access logs for REST API

Version 2
    Share:|

    This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.


    PRODUCT:

    Remedy AR System Server



    QUESTION:

    How to enable jetty access logs


    ANSWER:

    In order to enable jetty logs we would need to change a file named 

    BMC Software\ARSystem\jetty\etc\jetty.xml


    Find a line  <New id="RequestLog" class="org.eclipse.jetty.server.handler.RequestLogHandler"/>

    and change it to

    <New id="RequestLog" class="org.eclipse.jetty.server.handler.RequestLogHandler">
                     <Set name="requestLog">
                          <New id="RequestLogImpl" class="org.eclipse.jetty.server.NCSARequestLog">
                            <Set name="filename"><Property name="jetty.logs" default="../db/"/>/AccessLog-yyyy_mm_dd.request.log</Set>
                            <Set name="filenameDateFormat">yyyy_MM_dd</Set>
                            <Set name="LogTimeZone">GMT</Set>
                            <Set name="retainDays">90</Set>
                            <Set name="append">true</Set>
                            <Set name="LogLatency">true</Set>
                          </New>
                     </Set>
                 </New>


    AR server would need to be restarted

    Then on your logs would be on 

    C:\Program Files\BMC Software\ARSystem\db\AccessLog-2016_11_01.request.log

    The output on those logs would look like these

    172.22.110.245 -  -  [01/Nov/2016:13:37:04 +0000] "GET /api/arsys/v1/entry/zzTestJoinCell/?limit=10&sort=Another%20%23.asc HTTP/1.1" Async 629 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36" 424
    172.22.110.245 -  -  [01/Nov/2016:13:37:12 +0000] "GET /api/arsys/v1/entry/zzTestJoinCell/?limit=10&sort=Another HTTP/1.1" Async 190 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36" 49


    Article Number:

    000123722


    Article Type:

    FAQ/Procedural



      Looking for additional information?    Search BMC Support  or  Browse Knowledge Articles