Merging logs