Commit Graph

24 Commits

Author SHA1 Message Date
Jamie Tanna e456197add fix(logger): only truncate metaFields when they're string values (#45478)
When certain meta fields are logged, we pull them out of the meta fields
and into the log line, such as:

    DEBUG: Branch is not pending, removing pending upgrades (branch="renovate/express-4.x")

However, this also would affect non-string values such as:

    DEBUG: Git operations statistics (branch="[object Object]")

This only affects the "pretty" logs, but would mean no `branch` metadata
appears.

Instead, we can only include them when they're a string.

Co-authored-by: Claude Sonnet 5 <jamie.tanna+claude-code@mend.io>
2026-08-26 12:13:22 +00:00
Jamie Tanna 4c8a1bd59d refactor(logger): remove unused dependencies as a stringified metaField (#45477)
As part of future changes, we need to correct the stringification logic
when `branch` is an object.

While looking at this, we noticed that `dependencies` is - likely - an
array of items being handled by `.toString()`ing them.

However, there's no existing cases in the codebase of this behaviour, so
we can remove it from `metaFields`.

Co-authored-by: Claude Sonnet 5 <jamie.tanna+claude-code@mend.io>
2026-08-26 12:13:22 +00:00
Felipe Santos cec112a2eb fix(log): last log lines of config-validator not being written to file (#43052)
* fix(log): last log lines of config-validator not being written to file

* Use simpler write

* Simplify RenovateStream now that it only writes to stdout

* Rename RenovateStream to PrettyStdoutStream

* Simplify comment
2026-05-04 16:51:56 +00:00
Jamie Tanna 6fdb8ae454 fix(log): ensure that log output is always flushed (#43021)
In cases where the process ends very quickly after a log line is
written, it could lead to cases where that log line doesn't appear on
`stdout`.

We can make sure that we always explicitly call the callback.

This only affected the "pretty" output in the CLI, and only when log
lines were written fairly close to process end.

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
2026-05-01 08:39:39 +00:00
Felipe Santos 1c886e043e fix(logger): log file using pretty format not working (#42319)
* fix(logger): throwing when logging to file using pretty format

* Fix review comments

* Fix previously existing tests too

* Keep file.path

* Custom handle err.stack for readability

* Delete `file.path` since bunyan doesn't use it anyway

* Restore append flag for consistency with JSON format
2026-04-14 18:36:05 +00:00
Sergei Zharinov 930cf6633c refactor: Rewrite imports with .ts extensions (#40700)
fix: Additional vi.mock path corrections and prettier formatting
2026-01-26 22:48:17 +00:00
Dueen Eduarda 3c5f00625f refactor: replace chalk with node util for styling in logger (#40366)
refactor: replace chalk with util for styling in logger
2026-01-15 18:04:26 +00:00
RahulGautamSingh 587b9a9cda refactor: use re2 (#36957) 2025-07-12 16:27:13 +00:00
Michael Kriese bb5377b3d8 test: fix code coverage (#34495) 2025-02-26 12:40:30 +00:00
Jamie Magee 176282e65f chore: use node: protocol imports (#21181) 2023-03-28 21:05:36 +00:00
Gabriel-Ladzaretti 9f837f226d feat(lib/logger): add base branch metadata for multi-base repositories (#17027) 2022-08-12 08:19:31 +00:00
RahulGautamSingh ee2e155f1f fix: modify regex to be re2 compatbile (#12778)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2021-11-29 19:16:05 +00:00
RahulGautamSingh 4b16903ff1 fix: modified regex to use RE2 (#12025)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2021-10-19 14:53:34 +02:00
Michael Kriese 7daa93a78d refactor: extract types to new files (#9951) 2021-05-11 12:51:21 +02:00
Michael Kriese 74d7691bef refactor: optimize type usage (#8947) 2021-03-02 21:44:55 +01:00
Sergio Zharinov f411dde51a refactor(logger): Fix lint warnings (#7109) 2020-08-27 09:12:37 +02:00
Rhys Arkins 53ca91301f chore: import linting (#6105) 2020-05-01 18:03:48 +02:00
renovate[bot] 4f59b62da4 chore(deps): update dependency prettier to v2 (#5952)
* chore(deps): update dependency prettier to v2

* Run prettier-fix

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jamie Magee <jamie.magee@gmail.com>
2020-04-12 18:09:36 +02:00
Rhys Arkins f1d0b7b5fe refactor: lower some levels from info to debug
Ref #5555
2020-02-24 09:26:42 +01:00
Rhys Arkins adde436df0 feat(logger): logContext (#5553)
Adds a new concept `logContext`, to be added to each log entry when in JSON format.

Closes #5551
2020-02-23 07:31:13 +01:00
Michael Kriese f0d4995fda fix(eslint): '@typescript-eslint/explicit-function-return-… (#4872) 2019-11-26 16:13:07 +01:00
Rhys Arkins 8d0aa39920 refactor(eslint): '@typescript-eslint/explicit-function-return-type' improvements 2019-11-24 08:43:24 +01:00
Michael Kriese f650b851c5 feat(logger): store and print errors on exit (#4257) 2019-08-15 12:43:13 +02:00
Jamie Magee f334c568a5 feat(typescript): convert logger to typescript (#3671) 2019-07-15 11:04:05 +02:00