Fixed regression issue introduce with Circular buffer improvement. 

This pull request created on top of loggingcodeRefactoring branch, 

This fix is depend on kernel pull request [ https://github.com/wso2-dev/carbon4-kernel/pull/85 ] . Merge it befor this.