chore: set debug as the default
This commit is contained in:
+2
-1
@@ -10,6 +10,7 @@ import (
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// grab the environment variables from the runtime environment
|
// grab the environment variables from the runtime environment
|
||||||
|
// unfortunately since its before we configure the loglevel, we cannot use slog logging in those functions
|
||||||
env := utility.GrabEnvironment()
|
env := utility.GrabEnvironment()
|
||||||
// configure the logger so we have nice json
|
// configure the logger so we have nice json
|
||||||
level := utility.ParseSlogLevel(env.LogLevel) // defaults to Info
|
level := utility.ParseSlogLevel(env.LogLevel) // defaults to Info
|
||||||
@@ -19,7 +20,7 @@ func main() {
|
|||||||
slog.SetDefault(logger)
|
slog.SetDefault(logger)
|
||||||
|
|
||||||
// print our running environment variable set
|
// print our running environment variable set
|
||||||
slog.Debug("environment", "env", env)
|
slog.Debug("displaying environment", "env", env)
|
||||||
|
|
||||||
// TO DO, allow cmd args parsing
|
// TO DO, allow cmd args parsing
|
||||||
|
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ func GrabEnvironment() Environment {
|
|||||||
// Basic server configuration
|
// Basic server configuration
|
||||||
Version: safeStringGrab("VERSION", "0.0.1"),
|
Version: safeStringGrab("VERSION", "0.0.1"),
|
||||||
Codename: safeStringGrab("CODENAME", "Magical Anomaly"),
|
Codename: safeStringGrab("CODENAME", "Magical Anomaly"),
|
||||||
LogLevel: safeStringGrab("LOG_LEVEL", "info"),
|
LogLevel: safeStringGrab("LOG_LEVEL", "debug"),
|
||||||
|
|
||||||
// GIN API configuration
|
// GIN API configuration
|
||||||
DataDirectory: safeStringGrab("DATA_DIR", fbBase),
|
DataDirectory: safeStringGrab("DATA_DIR", fbBase),
|
||||||
|
|||||||
Reference in New Issue
Block a user