This commit is contained in:
Noah 2024-12-20 02:09:07 +01:00
parent 0c9b98cab4
commit 8fecdee6b8
No known key found for this signature in database
GPG key ID: D2A7E2C8F77E0430
16 changed files with 408 additions and 1 deletions

35
main.go Normal file
View file

@ -0,0 +1,35 @@
package main
import (
"fmt"
"os"
"time"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
"watn3y/steamsalty/config"
)
func main() {
fmt.Println("Starting SteamSalty...")
configureLogger()
config.LoadConfig()
bot()
}
func configureLogger() {
output := zerolog.ConsoleWriter{Out: os.Stdout, TimeFormat: time.DateTime}
log.Logger = zerolog.New(output).With().Timestamp().Caller().Logger()
//! note that we overwrite the loglevel after loading the config in config/config.go. This is just the default
zerolog.SetGlobalLevel(zerolog.TraceLevel)
log.Info().Msg("Started Logger")
}