logplease icon indicating copy to clipboard operation
logplease copied to clipboard

Can't log a message with an object

Open pkellner opened this issue 5 years ago • 0 comments

That is, when I do a try catch, I want to log the "e" of the try catch. I can create two log messages in a row like this but the second one is unlabled which is confusing. I can't use JSON.stringify because of circular reference errors.

 } catch (e) {
    logger.error(`server.ts:getSessionUrls errored:${e.message}`);
    logger.error(e);
}

pkellner avatar Jul 13 '19 14:07 pkellner