https://garden.io logo
#💻|dev
Title
# 💻|dev
c

calm-family-29323

03/31/2023, 10:19 AM
@brief-restaurant-63679 could you do a presentation or a write-up about the new logger and guide the rest of us through the new design principles, motivations and future plans.
For example: I noticed that for actions that have a completed status nothing is logged on the info level which is not ideal. For example if I run
build backend
but backend is already built these are the info logs:
Copy code
Build 🔨 

ℹ garden                    → Running in environment remote.orz
ℹ providers                 → Getting status...
✔ providers                 → Cached (in 0.5 sec)
ℹ providers                 → Run with --force-refresh to force a refresh of provider statuses.
ℹ graph                     → Resolving actions and modules...
✔ graph                     → Done (in 0.1 sec)

Done! ✔️
I think this is missing something like
build.backend (v-something) is already built
, but when I went and tried to implement this I found myself a bit perplexed with the amount of ways to achieve this cc @brief-restaurant-63679
c

curved-intern-91221

03/31/2023, 2:07 PM
Yes, I've also noticed that, We have a GH issue for this: https://github.com/garden-io/garden/issues/3823
b

brief-restaurant-63679

04/11/2023, 8:04 AM
Sorry for the late reply. Was on holiday. But yes, I'd love to do that. Looks like this is just an error on my end though.
c

calm-family-29323

04/28/2023, 1:21 PM
@brief-restaurant-63679 I await the day
b

brief-restaurant-63679

04/28/2023, 1:28 PM
Yeah, I'm wrapping this one up. Will add some docs along the way. https://github.com/garden-io/garden/pull/4138 This simplifies a few things, e.g. removes
section
and in the majority of cases sets the symbol and styling correctly based on the level. So the consumer just does
log.warn("oh noes")
as opposed to
log.warn({ msg: chalk.yellow("oh noes"), symbol: "warning" })
And in general the logger is now just a lot simpler than the fancy stuff. But I'll write up all the details when I finalise the PR.