lograge icon indicating copy to clipboard operation
lograge copied to clipboard

Guidance on testing lograge config?

Open thegorgon opened this issue 5 years ago • 1 comments

I've configured lograge in my controllers to bubble up info from my controllers and log them as custom options, but I can't figure out how to write an automated test to ensure the pieces are hooked up together.

Any guidance?

thegorgon avatar May 24 '19 02:05 thegorgon

Currently in my test cases, I do this really odd trick:

Lograge.logger.level = 0

because my test environment logger.level is by default set to :error.

When I try to do

allow(Lograge.logger).to receive(:level).and_return(0)

this does not seem to be working. I appreciate if there is some way for us to test the config in lograge.

sweetat-xfers avatar Jun 16 '20 04:06 sweetat-xfers