Events with circular structures halts all logging to server
Cheesier opened this issue · comments
Oscar Thunberg commented
An event with properties that have circular structures makes _dequeBatch fail every time, stopping all logging.
Failing code: https://github.com/datalust/seq-logging/blob/dev/seq_logger.js#L212
I propose that in the case JSON.parse fails we try to build a new object but with a string indicating circular structures.
Example event:
const a = {};
a.a = a;
const event = {
level: "Error",
timestamp: new Date(),
messageTemplate: 'Circular dependency issue!',
properties: { a }
};`