Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-15764

Optimize logging with lazy log parameter evaluation

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Normal
    • Resolution: Duplicate
    • None
    • Observability/Logging
    • None
    • Performance
    • Normal
    • All
    • None

    Description

      Multiple logging statements in the source evaluate methods and use the return values as log parameter.
      It does no harm when the log level permits for the statement.
      However, for the logs that are permitted, the evaluation is a wastes of CPU.
      The log parameters are not needed, but still being evaluated!
      For such cases, lazy evaluation (by leveraging lambda) can be introduced to skip competing the string parameter.

      Attachments

        Issue Links

          Activity

            People

              yifanc Yifan Cai
              yifanc Yifan Cai
              Yifan Cai
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: