When I run Fortify Scan on my project i do see that i'm logging the exceptions using

```
LOGGER.error(e.getMessage(),e);

```

and it says this is not the right way because attckers may get access to this info and get system info from this and plan an attack.

What is the best way to do this?(without compramising on the security)?