Reduced logging

graph-rework
noah metz 2023-06-19 15:47:40 -06:00
parent fcd27be3de
commit de93d05289
1 changed files with 2 additions and 2 deletions

@ -59,7 +59,7 @@ func (logger * DefaultLogger) Init(components []string) error {
}
func (logger * DefaultLogger) Logm(component string, fields map[string]interface{}, format string, items ... interface{}) {
logger.Init(logger.Components)
logger.Init([]string{"gql", "gqlws"})
l, exists := logger.Loggers[component]
if exists == true {
log := l.Log()
@ -71,7 +71,7 @@ func (logger * DefaultLogger) Logm(component string, fields map[string]interface
}
func (logger * DefaultLogger) Logf(component string, format string, items ... interface{}) {
logger.Init(logger.Components)
logger.Init([]string{"gql", "gqlws"})
l, exists := logger.Loggers[component]
if exists == true {
l.Log().Msg(fmt.Sprintf(format, items...))