Added ability to disable logging

Change-Id: I268e1aedf0c6e995871fc5d6f8160005a1b8ad09