tobiipro / minlog

minlog. A minimal JavaScript logger of events with structured data.
Apache License 2.0
3 stars 0 forks source link

Confusing error message when calling with incorrect log level #28

Open tobiiasl opened 4 years ago

tobiiasl commented 4 years ago

When calling minlog e.g. like this:

  logger.log('foo');

there will be an error thrown stating: Error: Unknown level name . Known: time,fatal,verbose,silly,emergency,alert,critical,error,warning,notice,informational,debug,warn,info,trace.

The log level used is not specified in the error message (which seems to be the intention).

image

andreineculau commented 4 years ago

@tobiiasl using 0.8.7 (latest)? i added a test, but it I don't see the missing "foo" (level name)