Merge changes I06bea24c,I8e2e24af

* changes:
  Change log libraries in tests to be statically linked
  Fix casting bug, add control for hard quotas.