function concat(array1, array2, index) {
    return array1.concat(Array.prototype.slice.call(array2, index));
  }
@ngdoc service
@name $log

@description
Mock implementation of {@link ng.$log} that gathers all logged messages in arrays
(one array per logging level). These arrays are exposed as `logs` property of each of the
level-specific log function, e.g. for level `error` the array is exposed as `$log.error.logs`.