You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Want something to provide functionality similar to tchannel-go, a logger which will fail when it sees unexpected log messages.
Ideally, we'd avoid requiring a defer by:
Create a logger with a set of options for what is allowed ideally using functional options that allow you to do things like IgnoreMessage("message").AnyTimes(), or specify minimum levels etc
Store all logs in-memory, until it receives an unexpected log message
Once we hit a bad message, fail the test, log all previous messages (probably using t.Log), and then start logging all further messages to the logger.
The text was updated successfully, but these errors were encountered:
This doesn't satisfy all the requirements you mentioned, but it's still "a logger which will fail when it sees unexpected log messages" implemented with just a little bit of boilerplate:
Want something to provide functionality similar to tchannel-go, a logger which will fail when it sees unexpected log messages.
Ideally, we'd avoid requiring a
defer
by:IgnoreMessage("message").AnyTimes()
, or specify minimum levels etct.Log
), and then start logging all further messages to the logger.The text was updated successfully, but these errors were encountered: