From b9574701b020043bc32656fda20de4c1ecc805ea Mon Sep 17 00:00:00 2001 From: Ayman Bagabas Date: Wed, 29 Mar 2023 16:40:47 -0400 Subject: [PATCH] feat(log): add log module --- log/log.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 log/log.go diff --git a/log/log.go b/log/log.go new file mode 100644 index 000000000..d2df5bbb4 --- /dev/null +++ b/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) + } +}