News for hackers. Stuff that matters.
Re:Build It Yourself by petecorreia on Friday January 24, 2025 @08:55AM (#42813032)
Go's vast standard library helps a lot with keeping dependency numbers down
Re:Build It Yourself by lionkor on Friday January 24, 2025 @09:20AM (#42813250)
Exactly this. You want logging in Rust? You will need at least `log` and another logger crate, for example `env_logger`, maybe the `dotenvy` crate to read `.env` files automatically, you already have 3 direct dependencies + all the transitive ones.

In Go: https://pkg.go.dev/log

Re:Build It Yourself by LinXitoW on Friday January 24, 2025 @04:00PM (#42816884)
The built-in "logging" in Go is barely more than a fancy Println. For example, where are the levels, like DEBUG and WARN?
Re:Build It Yourself by nickzelei on Friday January 24, 2025 @08:19PM (#42818542)
Re:Build It Yourself by jcgl on Saturday January 25, 2025 @06:19AM (#42820978)
The slog (structured logging) package of the stdlib has those, I believe. As well as support for custom levels.