func (c *Context) Config() Config {
	result := make(Config)
	c.modulesMutex.Lock()
	defer c.modulesMutex.Unlock()
	for name, module := range c.modules {
		if module.level != UNSPECIFIED {
			result[name] = module.level
		}
	}
	return result
}
Config returns the current configuration of the Loggers. Loggers
with UNSPECIFIED level will not be included.
package loggo
import (
	"fmt"
	"strings"
	"sync"
)
type Context struct {
	root *module
	modulesMutex sync.Mutex
	modules      map[string]*module
	writersMutex sync.Mutex
	writers      map[string]Writer
	writeMutex sync.Mutex
}
func NewContext(rootLevel Level) *Context {
	if rootLevel < TRACE || rootLevel > CRITICAL {
		rootLevel = WARNING
	}
	context := &Context{
		modules: make(map[string]*module),
		writers: make(map[string]Writer),
	}
	context.root = &module{
		level:   rootLevel,
		context: context,
	}
	context.modules[""] = context.root
	return context
}
func (c *Context) GetLogger(name string) Logger {
	name = strings.TrimSpace(strings.ToLower(name))
	c.modulesMutex.Lock()
	defer c.modulesMutex.Unlock()
	return Logger{c.getLoggerModule(name)}
}
func (c *Context) getLoggerModule(name string) *module {
	if name == rootString {
		name = ""
	}
	impl, found := c.modules[name]
	if found {
		return impl
	}
	parentName := ""
	if i := strings.LastIndex(name, "."); i >= 0 {
		parentName = name[0:i]
	}
	parent := c.getLoggerModule(parentName)
	impl = &module{name, UNSPECIFIED, parent, c}
	c.modules[name] = impl
	return impl
}