-
-
Notifications
You must be signed in to change notification settings - Fork 437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception noise from OAuth and REST (API2 ) #4501
Comments
Please post that lines. Looks like modified code. (?) |
The project has lots of custom API2. When the client requests certain info but fail some validations, an exception is thrown, an example of bad request: $this->_critical('Missing nationality', Mage_Api2_Model_Server::HTTP_BAD_REQUEST); magento-lts/app/code/core/Mage/Api2/Model/Resource.php Lines 613 to 626 in 00de7b5
Line 629 is |
In core thats line 625 ... Isnt it correct to log "$this->_critical('Missing nationality'"? |
Sure, it is OK to log, but it's unnecessary to include the trace in the log. |
I have a project with OAuth REST which is interfacing with a mobile app. The exception.log is filling up with millions of lines due to unnecessary logs:
Mage_Api2_Exception: oauth_problem=token_rejected in .../app/code/core/Mage/Api2/Model/Auth/Adapter/Oauth.php:49
Mage_Api2_Exception: Missing required params in .../app/code/core/Mage/Api2/Model/Resource.php:629
Mage_Oauth_Exception in .../app/Mage.php:648, .../app/code/core/Mage/Oauth/Model/Server.php(421)
Each exception has 11 lines or more.
Preconditions (*)
Any version.
Steps to reproduce (*)
May be by unit tests?
Expected result (*)
Mage::logException($e)
forMage_Api2_Exception
andMage_Oauth_Exception
?Actual result (*)
Noise in
exception.log
making it hard to detect the signal, problems that require attention.The text was updated successfully, but these errors were encountered: