richardartoul / nola

MIT License
74 stars 6 forks source link

Replace log with slog #59

Closed aratz-lasa closed 1 year ago

aratz-lasa commented 1 year ago

What ๐Ÿ•ต๏ธโ€โ™€๏ธ

This PR replaces log with slog, a structured logger that will soon become part of the standard Go library.

Why ๐Ÿ”‘

It makes logging more performant and tunable.

Testing ๐Ÿงช

Demo

asciicast

aratz-lasa commented 1 year ago

@richardartoul slog has an option for adding the source code position on every log. I've never used that because I don't find it necessary. But would you like to activate it or set a flag for activating it?

Screenshot 2023-04-07 at 15 31 11
richardartoul commented 1 year ago

Looks good! Just have some nits.

Thanks for doing this!