Added log enabled function.