feat(log): add log module

Ayman Bagabas created

Change summary

log/log.go | 14 ++++++++++++++
1 file changed, 14 insertions(+)

Detailed changes

log/log.go 🔗

@@ -0,0 +1,14 @@
+// Package log initializes the logger for Soft Serve modules.
+package log
+
+import (
+	"os"
+
+	"github.com/charmbracelet/log"
+)
+
+func init() {
+	if os.Getenv("SOFT_SERVE_DEBUG") == "true" {
+		log.SetLevel(log.DebugLevel)
+	}
+}