Annotation Type TestLogging


  • @Retention(RUNTIME)
    @Target({PACKAGE,TYPE,METHOD})
    public @interface TestLogging
    Annotation used to set a custom log level for controlling logging behavior in tests. Do not use this annotation when investigating test failures; instead, use TestIssueLogging. It supports multiple logger:level comma-separated key-value pairs of logger:level (e.g., org.elasticsearch.cluster.metadata:TRACE). Use the _root keyword to set the root logger level.
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      java.lang.String reason
      The reason this annotation is used to control logger behavior during a test.
      java.lang.String value
      A comma-separated list of key-value pairs of logger:level.
    • Element Detail

      • value

        java.lang.String value
        A comma-separated list of key-value pairs of logger:level. For each key-value pair of logger:level, the test framework will set the logging level of the specified logger to the specified level.
        Returns:
        the logger:level pairs
      • reason

        java.lang.String reason
        The reason this annotation is used to control logger behavior during a test.
        Returns:
        the reason for adding the annotation