0

I am using https://github.com/grpc/grpc-swift for inter-process communication. I have a GRPC server, and a iOS app written in Swift that communicates with it over the socket.

Let's say the Go server process is not running and I make an RPC call from my Swift program. But call failing and trying to debug and see what's wrong but not sure how can I get extra logs... I am trying to do something like this:

    var logger = Logger(label: "io.grpc", factory: StreamLogHandler.standardError(label: "test"))
    logger.logLevel = .trace

    let callOptions = CallOptions(timeLimit: .seconds(1), logger: logger)

but getting error saying that can not find StreamLogHandler in scope

What is the correct way to add logger for Swift GRPC calls?

tp2376
  • 690
  • 1
  • 7
  • 23
  • You can try to set up your logger with the docs: https://github.com/grpc/grpc-swift/blob/main/docs/faqs.md#logging--tracing – Joshua Mar 07 '23 at 05:51

0 Answers0