logErr :: MonadIO m
       => t -> IO (Maybe a) -> WriterT [t] m (Maybe a)
logErr err m = do
    res <- liftIO m
    when (isNothing res) (tell [err])
    return res


------------------------------------------------------------------------------
-- | Initialize the snaplet
logErr :: MonadIO m
       => t -> IO (Maybe a) -> WriterT [t] m (Maybe a)
logErr err m = do
    res <- liftIO m
    when (isNothing res) (tell [err])
    return res


------------------------------------------------------------------------------
-- | Initialize the snaplet
logErr err m = do
    res <- liftIO m
    when (isNothing res) (tell [err])
    return res


------------------------------------------------------------------------------
-- | Initialize the snaplet