Refactoring serverSide logging