ni_measurementlink_service
releases/1.4
  • API Reference
    • ni_measurementlink_service
      • Subpackages
        • ni_measurementlink_service.discovery
        • ni_measurementlink_service.grpc
          • Submodules
            • ni_measurementlink_service.grpc.channelpool
            • ni_measurementlink_service.grpc.loggers
              • Module Contents
                • Classes
                  • ClientLogger
                    • ClientLogger.is_enabled()
                    • ClientLogger.intercept_unary_unary()
                    • ClientLogger.intercept_unary_stream()
                    • ClientLogger.intercept_stream_unary()
                    • ClientLogger.intercept_stream_stream()
                  • ServerLogger
                    • ServerLogger.is_enabled()
                    • ServerLogger.intercept_service()
        • ni_measurementlink_service.measurement
        • ni_measurementlink_service.session_management
      • Package Contents
ni_measurementlink_service
  • API Reference
  • ni_measurementlink_service
  • ni_measurementlink_service.grpc
  • ni_measurementlink_service.grpc.loggers
  • Edit on GitHub

ni_measurementlink_service.grpc.loggers

gRPC logging interceptors.

Module Contents

Classes

ClientLogger

Intercepts gRPC client calls and logs them for debugging.

ServerLogger

Intercepts gRPC server calls and logs them for debugging.

class ni_measurementlink_service.grpc.loggers.ClientLogger[source]

Bases: grpc.UnaryUnaryClientInterceptor, grpc.UnaryStreamClientInterceptor, grpc.StreamUnaryClientInterceptor, grpc.StreamStreamClientInterceptor

Intercepts gRPC client calls and logs them for debugging.

classmethod is_enabled()[source]

Indicates whether gRPC client call logging is enabled for the current log level.

Return type:

bool

intercept_unary_unary(continuation, client_call_details, request)[source]

Intercept and log a unary call.

Parameters:
  • continuation (Callable[[grpc.ClientCallDetails, grpc.TRequest], grpc.CallFuture[grpc.TResponse]]) –

  • client_call_details (grpc.ClientCallDetails) –

  • request (grpc.TRequest) –

Return type:

grpc.CallFuture[grpc.TResponse]

intercept_unary_stream(continuation, client_call_details, request)[source]

Intercept and log a server-streaming call.

Parameters:
  • continuation (Callable[[grpc.ClientCallDetails, grpc.TRequest], grpc.CallIterator[grpc.TResponse]]) –

  • client_call_details (grpc.ClientCallDetails) –

  • request (grpc.TRequest) –

Return type:

grpc.CallIterator[grpc.TResponse]

intercept_stream_unary(continuation, client_call_details, request_iterator)[source]

Intercept and log a client-streaming call.

Parameters:
  • continuation (Callable[[grpc.ClientCallDetails, Iterator[grpc.TRequest]], grpc.CallFuture[grpc.TResponse]]) –

  • client_call_details (grpc.ClientCallDetails) –

  • request_iterator (Iterator[grpc.TRequest]) –

Return type:

grpc.CallFuture[grpc.TResponse]

intercept_stream_stream(continuation, client_call_details, request_iterator)[source]

Intercept and log a bidirectional streaming call.

Parameters:
  • continuation (Callable[[grpc.ClientCallDetails, Iterator[grpc.TRequest]], grpc.CallIterator[grpc.TResponse]]) –

  • client_call_details (grpc.ClientCallDetails) –

  • request_iterator (Iterator[grpc.TRequest]) –

Return type:

grpc.CallIterator[grpc.TResponse]

class ni_measurementlink_service.grpc.loggers.ServerLogger[source]

Bases: grpc.ServerInterceptor

Intercepts gRPC server calls and logs them for debugging.

classmethod is_enabled()[source]

Indicates whether gRPC client call logging is enabled for the current log level.

Return type:

bool

intercept_service(continuation, handler_call_details)[source]

Intercept and log a server call.

Parameters:
  • continuation (Callable[[grpc.HandlerCallDetails], grpc.RpcMethodHandler[grpc.TRequest, grpc.TResponse] | None]) –

  • handler_call_details (grpc.HandlerCallDetails) –

Return type:

grpc.RpcMethodHandler[grpc.TRequest, grpc.TResponse]

Previous Next

© Copyright 2024, National Instruments. Revision 2ba12c60.

Built with Sphinx using a theme provided by Read the Docs.