mirror of
https://codeberg.org/pluja/kycnot.me
synced 2025-01-22 12:21:11 -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 (
|
var (
|
||||||
// Flags
|
// Flags
|
||||||
debug = flag.Bool("debug", false, "sets log level to debug")
|
|
||||||
dev = flag.Bool("dev", false, "sets dev mode")
|
dev = flag.Bool("dev", false, "sets dev mode")
|
||||||
nocache = flag.Bool("nocache", false, "disables cache")
|
nocache = flag.Bool("nocache", false, "disables cache")
|
||||||
scraper = flag.Bool("scrap", false, "enables the scraper")
|
scraper = flag.Bool("scrap", false, "enables the scraper")
|
||||||
@ -30,7 +29,6 @@ func init() {
|
|||||||
config.Conf = config.Config{
|
config.Conf = config.Config{
|
||||||
Dev: *dev,
|
Dev: *dev,
|
||||||
Cache: *nocache,
|
Cache: *nocache,
|
||||||
Debug: *debug,
|
|
||||||
Scraper: *scraper,
|
Scraper: *scraper,
|
||||||
ListenAddr: *listen,
|
ListenAddr: *listen,
|
||||||
}
|
}
|
||||||
@ -38,16 +36,7 @@ func init() {
|
|||||||
// Flags
|
// Flags
|
||||||
log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stdout}).With().Logger()
|
log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stdout}).With().Logger()
|
||||||
zerolog.SetGlobalLevel(zerolog.InfoLevel)
|
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 {
|
if *dev {
|
||||||
log.Logger = log.Output(
|
log.Logger = log.Output(
|
||||||
zerolog.ConsoleWriter{
|
zerolog.ConsoleWriter{
|
||||||
|
Loading…
Reference in New Issue
Block a user