Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-25950

Allow Bamboo Access Logs to report time_taken and http_return_code

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • None
    • Logs
    • None
    • 1
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      Issue Summary

      Modify the Bamboo Access logs to include time_taken and http_return_code by default. At present, these details are only visible when debug mode is activated, which results in duplicate log entries (one at the INFO level and another at the DEBUG level).

      This is reproducible on Data Center: (yes)

      Steps to Reproduce

      1. Edit the log4j2.properties file (<BAMBOO_INSTALL>/atlassian-bamboo/WEB-INF/classes)
        1. Change the logger.accesslogfilter from INFO to DEBUG
          logger.accesslogfilter = DEBUG, accesslog, console 
      1. Save your changes and Restart Bamboo.
      2. Verify the Logs ( <HOME_FOLDER>/logs/atlassian-bamboo-access.log)
      2024-11-13 19:23:02,161 INFO [http-nio-8085-exec-12 url: /rest/api/latest/status] [AccessLogFilter] 10.232.***.*** - GET http://10.232.***.***:8085/rest/api/latest/status 243983kb 
      
      2024-11-13 19:23:02,166 DEBUG [http-nio-8085-exec-12 url: /rest/api/latest/status] [AccessLogFilter] END: 200 10.232.***.*** - GET http://10.232.***.***:8085/rest/api/latest/status 243983kb 4ms

      Expected Results

      Introduce a pattern parameter to enable Access Logs to display time_taken and http_return_code in INFO mode, or configure it to show these data points by default in INFO mode. Additionally, when the Access Log is set to DEBUG mode, there should be only a single entry per log

      Workaround

      The existing workaround to display time_taken and http_return_code involves configuring the Access Log mode to DEBUG using the log4j2 property.

              Unassigned Unassigned
              a995b085b0c5 Abhi Phull
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: