From 5cae60cd139e8dba3a4f0acf75df6218e7bd9162 Mon Sep 17 00:00:00 2001 From: Zac Brydon <52645024+zbrydon@users.noreply.github.com> Date: Wed, 24 Jul 2024 13:02:09 +1000 Subject: [PATCH] Update .changeset/smooth-ties-look.md Co-authored-by: Ryan Ling --- .changeset/smooth-ties-look.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.changeset/smooth-ties-look.md b/.changeset/smooth-ties-look.md index 3ae88eb..3063c81 100644 --- a/.changeset/smooth-ties-look.md +++ b/.changeset/smooth-ties-look.md @@ -2,4 +2,8 @@ '@seek/logger': major --- -Adds trimming to log fields with dedicated serializers +Apply trimming to serializers + +Previously, [built-in serializers](https://github.com/seek-oss/logger/tree/54f16e17a9bb94261b9d2e4b77f04f55d5a3ab4c?tab=readme-ov-file#standardised-fields) and custom ones supplied via the [`serializers` option](https://github.com/pinojs/pino/blob/8aafa88139890b97aca0d32601cb5ffdd9bda1eb/docs/api.md#serializers-object) were not subject to [trimming](https://github.com/seek-oss/logger/tree/54f16e17a9bb94261b9d2e4b77f04f55d5a3ab4c?tab=readme-ov-file#trimming). This caused some emitted error logs to be extremely large. + +Now, trimming is applied across all serializers by default. If you rely on deeply nested `err` properties to troubleshoot your application, tune the `maxObjectDepth` configured on your logger.