MDL-43759 logging: Update stores to remove duplicated code