mirror of
https://codeberg.org/pluja/kycnot.me
synced 2025-01-22 04:11:17 -05:00
remove debug flag
This commit is contained in:
parent
2dc513f11f
commit
5545c1d9ce
13
src/main.go
13
src/main.go
@ -17,7 +17,6 @@ import (
|
||||
|
||||
var (
|
||||
// Flags
|
||||
debug = flag.Bool("debug", false, "sets log level to debug")
|
||||
dev = flag.Bool("dev", false, "sets dev mode")
|
||||
nocache = flag.Bool("nocache", false, "disables cache")
|
||||
scraper = flag.Bool("scrap", false, "enables the scraper")
|
||||
@ -30,7 +29,6 @@ func init() {
|
||||
config.Conf = config.Config{
|
||||
Dev: *dev,
|
||||
Cache: *nocache,
|
||||
Debug: *debug,
|
||||
Scraper: *scraper,
|
||||
ListenAddr: *listen,
|
||||
}
|
||||
@ -38,16 +36,7 @@ func init() {
|
||||
// Flags
|
||||
log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stdout}).With().Logger()
|
||||
zerolog.SetGlobalLevel(zerolog.InfoLevel)
|
||||
if *debug {
|
||||
log.Debug().Msg("Debug mode enabled")
|
||||
log.Logger = log.Output(
|
||||
zerolog.ConsoleWriter{
|
||||
Out: os.Stdout,
|
||||
TimeFormat: "02.01.2006 15:04:05",
|
||||
},
|
||||
).With().Caller().Logger()
|
||||
zerolog.SetGlobalLevel(zerolog.DebugLevel)
|
||||
}
|
||||
|
||||
if *dev {
|
||||
log.Logger = log.Output(
|
||||
zerolog.ConsoleWriter{
|
||||
|
Loading…
Reference in New Issue
Block a user