By Clay Li on Monday, 09 March 2026
Category: Feature

Calem Debug Tip: Inspecting MySQL Queries in Calem Logs

​Inspecting MySQL queries in Calem logs may be useful when debugging issues in Calem. Here is an example to demonstrate it.

​It is frustrating for end users that an asset is in stock, but is not showing in stock list for disposal. Calem logs can help in this case. Admin users can inspect queries used to show stock list for disposal. Here're the steps:

Inspecting the logs and search for the stock list (cmv_in_stock) in the log - see the code block below where record count is 0 from the query searching for "10208" in data model "cmv_in_stock".

Let's walk through the query conditions in the log:


WHERE cm_asset_asset_id.asset_no LIKE '%10208%'
AND ((( (cmv_in_stock.qty > 0 and ifnull(cmv_in_stock.is_invalid,0)=0) ))
AND cmv_in_stock.category_id IN ('icg_part', 'icg_csm', 'icg_service', 'icg_tool')
AND cmv_in_stock.status_id IN ('ins_active', 'ins_np', 'ins_nu', 'ins_onhold')),

 Additional Resources