question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How do you enable exception logging?

See original GitHub issue

Created my server like below. Everything works fine, except that I don’t see stack traces when there are exceptions in gRPC handlers. I see other messages and was able to enable access log, however I don’t see stack traces. As much as I want those errors to never occur again, for now it is not an option. Thanks!

val grpc = GrpcServiceBuilder()
      .supportedSerializationFormats(GrpcSerializationFormats.values())
      .addService(RpcAuthService())
      .addService(RpcUserTableService())
      .addService(RpcTableService())
      .build()

    logger.info { "[$sub] grpc path mappings: ${grpc.pathMappings()}" }

    server = ServerBuilder()
      .port(core.grpcPort, SessionProtocol.HTTP)
      .service(
        grpc,
        corsBuilder.newDecorator()
      )
      .accessLogWriter(AccessLogWriters.common())
      .serviceLoggerPrefix("pfx")
      .build()

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
trustincommented, Jul 18, 2018

How about decorating your services with LoggingService.newDecorator(), just like you added CorsService?

0reactions
trustincommented, Aug 2, 2018

Thanks for getting back to us with an update. 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enable exception logging - Windows drivers | Microsoft Learn
The Enable exception logging flag creates a log of exception records in the kernel run-time library. You can access the log from a...
Read more >
Enabling the exception log - IBM
The exception log resource manager enables data relating to exceptions that occur at any time during processing on an integration server to ...
Read more >
Logging Exceptions in Java - Loggly
In this post, we'll look at common approaches to Java exception handling and logging. The examples use Log4j2, but the concepts apply to ......
Read more >
How to enable Exception logging in Visual Dialogue Portrait ...
The Visual Dialogue Exception logging is turned on in the "General" section of the Visual Dialogue "Options" window. kA1800000004Ma9CAE_en_US_1_2. Normally it ...
Read more >
How to log a Python exception? - GeeksforGeeks
Logging an exception in python with an error can be done in the logging.exception() method. This function logs a message with level ERROR...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found