Settlers clearing land to build log cabins would often call on neighbors for help in rolling the logs into heaps to be burned. These neighborly gatherings were social events, often ending in feasting and merrymaking. By one account from 1792 the "standard dinner dish at log-rollings, house-raisings, and harvest days, was a large pot-pie."
Social logrolling brought about the proverb "You roll my log, and I'll roll yours," implying that those being helped would do the same for their helpers. In the early 19th century, this expression of mutual assistance became tainted when it was adopted by legislators in Congress for their practice of exchanging votes for votes on projects of interest to each one. "Every member ... has votes to exchange for votes," observed a writer for The Atlantic Monthly in 1869, "and it sometimes seems as if all legislation at Washington had degenerated into log-rolling."
This figurative logrolling is practiced in other circles as well where support from others is needed to further private interests. It is not unheard of, for example, of authors exchanging favorable blurbs in support of each other's books in order to promote sales and reputations.
(from Merriam-Webster Online)