Rework pkg/log, add 'loglevel' and 'logdate' flags, streamline

- removes some previously added manual location strings: now handled by pkg/log depending on loglevel
- kept manual string locations on fmt print functions
- add 'notice' and 'critical' loglevels
- add 'Panic' and 'Panicf' functions to log panics
- adresses issue #26
This commit is contained in:
Christoph Kluge
2023-01-23 18:48:06 +01:00
parent 25286ff068
commit 79a949b55e
22 changed files with 368 additions and 209 deletions

View File

@@ -54,7 +54,7 @@ func Validate(k Kind, r io.Reader) (err error) {
var v interface{}
if err := json.NewDecoder(r).Decode(&v); err != nil {
log.Errorf("SCHEMA/VALIDATE > Failed to decode %v", err)
log.Errorf("Failed to decode %v", err)
return err
}