mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-07-23 04:51:39 +02:00
Simplify log wrapper implementation
This commit is contained in:
@@ -88,8 +88,7 @@ func main() {
|
||||
}
|
||||
|
||||
// Apply config flags for pkg/log
|
||||
log.SetLogLevel(flagLogLevel)
|
||||
log.SetLogDateTime(flagLogDateTime)
|
||||
log.Init(flagLogLevel, flagLogDateTime)
|
||||
|
||||
// See https://github.com/google/gops (Runtime overhead is almost zero)
|
||||
if flagGops {
|
||||
@@ -297,7 +296,7 @@ func main() {
|
||||
if flagDev {
|
||||
r.Handle("/playground", playground.Handler("GraphQL playground", "/query"))
|
||||
r.PathPrefix("/swagger/").Handler(httpSwagger.Handler(
|
||||
httpSwagger.URL("http://" + config.Keys.Addr + "/swagger/doc.json"))).Methods(http.MethodGet)
|
||||
httpSwagger.URL("http://" + config.Keys.Addr + "/swagger/doc.json"))).Methods(http.MethodGet)
|
||||
}
|
||||
secured.Handle("/query", graphQLEndpoint)
|
||||
|
||||
|
Reference in New Issue
Block a user