Package org.jboss.resteasy.tracing

## Interface RESTEasyTracingLogger

-     public interface RESTEasyTracingLogger

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface | Description
    --- | --- | ---
    `static class` | `RESTEasyTracingLogger.TRACING` |

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static RESTEasyTracingLogger` | `EMPTY` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static RESTEasyTracingLogger` | `create​(String requestId, String threshold, String loggerNameSuffix)` | Create new Tracing logger.
    `static RESTEasyTracingLogger` | `create​(String requestId, String tracingThreshold, String tracingLoggerNameSuffix, String tracingInfoFormat)` |
    `static RESTEasyTracingLogger` | `create​(String invocationId, javax.ws.rs.core.Configuration configuration, String loggerNameSuffix)` | Create new Tracing logger.
    `static RESTEasyTracingLogger` | `empty()` |
    `void` | `flush​(javax.ws.rs.core.MultivaluedMap<String,​Object> headers)` | Stores collected tracing messages to response HTTP header.
    `static RESTEasyTracingLogger` | `getInstance​(HttpRequest request)` | Returns instance of `TracingLogger` associated with current request processing (`propertiesDelegate`).
    `static String` | `getTracingConfig​(javax.ws.rs.core.Configuration configuration)` | Return configuration type of tracing support according to application configuration.
    `static String` | `getTracingThreshold​(javax.ws.rs.core.Configuration configuration)` | Get application-wide tracing level threshold.
    `static void` | `initTracingSupport​(javax.ws.rs.core.Configuration configuration, HttpRequest request)` | According to configuration/request header it initialize `RESTEasyTracingLogger` and put it to the request properties.
    `boolean` | `isLogEnabled​(String eventName)` |
    `static boolean` | `isTracingConfigALL​(javax.ws.rs.core.Configuration configuration)` |
    `void` | `log​(String eventName, Object... args)` |
    `void` | `logDuration​(String eventName, long fromTimestamp, Object... args)` |
    `static void` | `logStart​(HttpRequest request)` | Log tracing messages START events.
    `long` | `timestamp​(String eventName)` |

- - ### Field Detail

    - #### EMPTY

          static final RESTEasyTracingLogger EMPTY

  - ### Method Detail

    - #### isLogEnabled

          boolean isLogEnabled​(String eventName)

    - #### log

          void log​(String eventName,
                   Object... args)

    - #### logDuration

          void logDuration​(String eventName,
                           long fromTimestamp,
                           Object... args)

    - #### timestamp

          long timestamp​(String eventName)

    - #### flush

          void flush​(javax.ws.rs.core.MultivaluedMap<String,​Object> headers)

      Stores collected tracing messages to response HTTP header.
      Parameters:
        `headers` - message headers.

    - #### create

          static RESTEasyTracingLogger create​(String requestId,
                                              String threshold,
                                              String loggerNameSuffix)

      Create new Tracing logger.
      Parameters:
        `requestId` - request id.
        `threshold` - tracing level threshold.
        `loggerNameSuffix` - tracing logger name suffix.
      Returns:
        new tracing logger.

    - #### create

          static RESTEasyTracingLogger create​(String requestId,
                                              String tracingThreshold,
                                              String tracingLoggerNameSuffix,
                                              String tracingInfoFormat)

    - #### create

          static RESTEasyTracingLogger create​(String invocationId,
                                              javax.ws.rs.core.Configuration configuration,
                                              String loggerNameSuffix)

      Create new Tracing logger. Used by client invocation.
      Parameters:
        `invocationId` - calling ClientInvocation instance id
        `configuration` - configuration
        `loggerNameSuffix` - tracing logger name suffix.
      Returns:
        new tracing logger.

    - #### getInstance

          static RESTEasyTracingLogger getInstance​(HttpRequest request)

      Returns instance of `TracingLogger` associated with current request processing (`propertiesDelegate`).
      Parameters:
        `request` - http request
      Returns:
        returns instance of `TracingLogger` from `ResteasyProviderFactory`. Does not return `null`.

    - #### empty

          static RESTEasyTracingLogger empty()

    - #### initTracingSupport

          static void initTracingSupport​(javax.ws.rs.core.Configuration configuration,
                                         HttpRequest request)

      According to configuration/request header it initialize `RESTEasyTracingLogger` and put it to the request properties.
      Parameters:
        `configuration` - application-wide tracing configuration type and tracing level threshold.
        `request` - request instance to get runtime properties to store `RESTEasyTracingLogger` instance to if tracing support is enabled for the request.

    - #### logStart

          static void logStart​(HttpRequest request)

      Log tracing messages START events.
      Parameters:
        `request` - container request instance to get runtime properties to check if tracing support is enabled for the request.

    - #### isTracingConfigALL

          static boolean isTracingConfigALL​(javax.ws.rs.core.Configuration configuration)

    - #### getTracingConfig

          static String getTracingConfig​(javax.ws.rs.core.Configuration configuration)

      Return configuration type of tracing support according to application configuration.

      By default tracing support is switched OFF.

      Parameters:
        `configuration` - configuration
      Returns:
        the configuration type

    - #### getTracingThreshold

          static String getTracingThreshold​(javax.ws.rs.core.Configuration configuration)

      Get application-wide tracing level threshold.
      Parameters:
        `configuration` - configuration
      Returns:
        tracing level threshold.