Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-3974

Improvements to debug log

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: sometime
    • Component/s: Logging
    • Labels:

      Description

      A couple suggestions to improve the readability of the debug logs.

      1. Can the transaction ID be put on every debug log entry, similar to how the thread ID is on every debug log entry? Then you could grep for a particular transaction ID and only see those messages.
      2. Can we get a squid.log field for transaction ID? Then you can go looking for it in debug log.
      3. Some messages currently have transaction ID inside of square braces, but square braces are used elsewhere. For example:
        [Oct 19 15:56:16.140] Server {0x2b3dbf130700} DEBUG: (http) [147596] State Transition: SM_ACTION_ORIGIN_SERVER_OPEN -> SM_ACTION_SERVER_READ

        In the above example 147596 is transaction ID. But look at this:

        [Oct 19 10:29:10.273] Server {0x7ff0c9de08c0} DEBUG: <HttpClientSession.cc:498 (release)> (http_cs) [2] session released by sm [1]

        Square braces notation also used for HTTP2 client session and state machine. So please pick something unique for transaction ID.

      4. Is it necessary for http header debug messages to be split across so many lines? At a minimum can the header name and header value be on the same line? Its hard to read debug log output when there are many clients making requests at same time as the messages are not grouped together/written sequentially.
        [Oct 19 20:18:44.744] Server {0x2b871b635700} DEBUG: (http)
        [Oct 19 20:18:44.744] Server {0x2b871b635700} DEBUG: (http) 	SLOT # 4 (0x2b8818421188), LIVE
        [Oct 19 20:18:44.744] Server {0x2b871b635700} DEBUG: (http) [N: "Accept-Language", N_LEN: 15, N_IDX: 2,
        [Oct 19 20:18:44.744] Server {0x2b871b635700} DEBUG: (http) V: "en-ca", V_LEN: 5,
        [Oct 19 20:18:44.745] Server {0x2b871b635700} DEBUG: (http) NEXTDUP: (nil), RAW: 1, RAWLEN: 24, F: 1]
        [Oct 19 20:18:44.745] Server {0x2b871b635700} DEBUG: (http)
        

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                danobi Daniel Xu
                Reporter:
                dcarlin David Carlin
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated: