Skip to content

Exceptions logged with Logback + SLF4J don't show up in Stackdriver #2735

@bigunyak

Description

@bigunyak

I'm using the Logback + SLF4J logging configuration described in the official documentation here.
Everything works fine with simple log messages like:

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
...
private static final Logger logger = LoggerFactory.getLogger(MyClass.class);
...
logger.info("Hello world");

The problem appears when I try to log exceptions like this:

logger.error("Something went wrong:", ex);

I see only my description message in Stackdriver but not the stack trace from the provided exception.
What can be the problem here?

Metadata

Metadata

Assignees

Labels

api: loggingIssues related to the Cloud Logging API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions