[Catalyst] Puzzlement about logging
robrwo at gmail.com
Mon Mar 18 15:38:20 GMT 2013
I have a strange issue with testing the output to $c->log->info in some tests.
The app has various database roles that act as wrappers for tables,
basically to ensure consistency of behaviour, such as whether the user has
access to the table, emitting log messages that records were created/updated
etc. (The role methods take the Catalyst context as a parameter.)
When running the tests of database roles, no log messages are output.
BUT when running tests of the API controller methods using
Test::WWW::Mechanize::Catalyst, log messages are output.
Even stranger, to set up these tests, we run the same database record
creation methods to add records to test in the API. These do output log
messages, AND they cannot be captured to be tested using Capture::Tiny.
Has anyone run into something like this before?
More information about the Catalyst