Fix logger config and parser bugs; use scanner instead of reading request body at once

This commit is contained in:
Andrey Shcherbinin
2021-06-04 08:50:12 +00:00
committed by Stanislav N. aka pztrn
parent fb34d0d53e
commit a252681b26
4 changed files with 26 additions and 18 deletions

View File

@@ -9,6 +9,10 @@ type Logger struct {
// NewLogger creates new logging wrapper and returns it to caller.
func NewLogger(config *Config) *Logger {
if config == nil {
config = &Config{Debug: false}
}
l := &Logger{config: config}
return l