DRYed log publish code