Closed ionut998 closed 7 years ago
I've updated the documentation on how to avoid having to rename all calls to API.logger, just reassign it, as below:
use Sapience::Extensions::Grape::Middleware::Logging, logger: Sapience[self] API.logger = Sapience.logger
We noticed that when including this in the tableau_api_gateway, we had the following line in the API:
We were assuming that when we caught an error (e.g. by hitting
/err
in the code above), we would see an error logged in the Sapience format. However, we only see an error logged directly toSTDOUT
by theAPI.logger
(which is a plain oldLogger
).We don't want to have to go through all apps and change
API.logger
toSapience.logger
do we? We're not doing that when Sapience included in Rails...