I am creating a Javascript logger, in which, on error messages, I am also adding the stack trace like this:

```
function logMessage(logMessage) 
{
  let stackTrace = new Error().stack;
  logMessage.stackTrace = stackTrace;
  ...
}

```

This gives me the stack trace, but it also obviously adds the method of `logMessage` itself as the last item on the stack... 

How can I remove the last trace so I'll only see the trace up until the point that the `logMessage` was called, but without the `logMessage` itself?