By adding `%ex` to the logger pattern, we will end up getting the stack trace from
exceptions.

All you have to do is something like:

```
catch {
  case e: Throwable => logger.error("Error message", e)
}

```

and logback will do the rest.