Class ::nsmcp::LogRecordParser

::nsmcp::LogRecordParser[i] create ... \
           [ -colorCodeMap colorCodeMap ]

Defined in /usr/local/ns/tcl/nsmcp/log-record.tcl

Class Relations

  • class: ::nx::Class[i]
  • superclass: ::nsmcp::Object[i]

Methods (to be applied on instances)

  • accessRequestIdentifier (scripted, public)

     <instance of nsmcp::LogRecordParser[i]> accessRequestIdentifier \
        message

    Extract the request identifier from a supported access-log message. Inspect the access-log identifier field rather than guessing from URLs or headers.

    Parameters:
    message (required)
    Diagnostic message text.
    Returns:
    The validated request identifier, or an empty result when unavailable.

    Testcases:
    No testcase defined.
  • continuation (scripted, public)

     <instance of nsmcp::LogRecordParser[i]> continuation message line

    Decide whether a physical line continues the current logical record. Use supported continuation prefixes and message context to avoid treating unrelated lines as one record.

    Parameters:
    message (required)
    Current logical-record message used to interpret continuation prefixes.
    line (required)
    Following physical line to classify.
    Returns:
    True when the line is a continuation, otherwise false.

    Testcases:
    No testcase defined.
  • metadata (scripted, public)

     <instance of nsmcp::LogRecordParser[i]> metadata message

    Extract structured metadata from a log message. Normalize supported system/access layouts and enrich request timing when an access parser is available.

    Parameters:
    message (required)
    Diagnostic message text.
    Returns:
    The parsed metadata dictionary.

    Testcases:
    No testcase defined.
  • stripAnsi (scripted, public)

     <instance of nsmcp::LogRecordParser[i]> stripAnsi message

    Remove recognized ANSI formatting from a system-log message. Initialize the color-code map lazily; return unformatted input without further transformation.

    Parameters:
    message (required)
    Diagnostic message text.
    Returns:
    The message with recognized ANSI codes removed.

    Testcases:
    No testcase defined.
  • timestampSeconds (scripted, public)

     <instance of nsmcp::LogRecordParser[i]> timestampSeconds timestamp

    Convert a supported NaviServer log timestamp to epoch seconds. Validate the timestamp layout and retain supported fractional-second information.

    Parameters:
    timestamp (required)
    Parsed timestamp or timing base supplied by the parser.
    Returns:
    The parsed epoch timestamp, or an empty result for an invalid timestamp.

    Testcases:
    No testcase defined.
  • validConnectionIdentifier (scripted, public)

     <instance of nsmcp::LogRecordParser[i]> validConnectionIdentifier \
        identifier

    Validate a complete connection-thread identifier. Require the server, pool, worker and request fields of the connection identifier.

    Parameters:
    identifier (required)
    Complete log-thread identifier, or the raw identifier field when parsing access records.
    Returns:
    True for a valid connection identifier, otherwise false.

    Testcases:
    No testcase defined.
  • validRequestIdentifier (scripted, public)

     <instance of nsmcp::LogRecordParser[i]> validRequestIdentifier \
        identifier

    Validate a complete NaviServer log-thread identifier. Accept the dash-delimited identifier form used by connection, scheduler and job threads.

    Parameters:
    identifier (required)
    Complete log-thread identifier, or the raw identifier field when parsing access records.
    Returns:
    True for an accepted request identifier, otherwise false.

    Testcases:
    No testcase defined.