Skip to content

Commit

Permalink
Use env variable for log level
Browse files Browse the repository at this point in the history
  • Loading branch information
lxcode committed Oct 15, 2024
1 parent 69e3c4f commit ca38740
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ func main() {
}

func run(args []string) {

logLevel, err := log.ParseLevel(os.Getenv("LOG_LEVEL"))
if err != nil {
logLevel = log.InfoLevel
}

log.SetLevel(logLevel)

app := &cli.App{
Name: "skyfall",
Usage: "A simple CLI for Bluesky data ingest",
Expand Down

0 comments on commit ca38740

Please sign in to comment.