Skip to content

Commit

Permalink
merge main/office365
Browse files Browse the repository at this point in the history
  • Loading branch information
osmontero committed Feb 16, 2024
1 parent a7c8a20 commit 1254b7b
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions office365/utils/utils.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,31 @@
package utils

import "github.com/threatwinds/logger"
import (
"log"
"os"
"strconv"

"github.com/threatwinds/logger"
)

var Logger *logger.Logger

func init() {
lenv := os.Getenv("LOG_LEVEL")
var level int
var err error

if lenv != "" && lenv != " " {
level, err = strconv.Atoi(lenv)
if err != nil {
log.Fatalln(err)
}
} else {
level = 400
}

Logger = logger.NewLogger(&logger.Config{
Format: "text",
Level: 200,
Level: level,
})
}

0 comments on commit 1254b7b

Please sign in to comment.