Origin of "Boogie"

Pared down to enhance understanding and save time.
Extracts and shortkey from: http://www.straightdope.com/classics/a1_288.html

And then the comments by bintang on “Bugi” being Java Sea pirates …

With all this I’m surprised that no connection was made to ‘boogers,’ those semi-solidified excretions of bodily fluids that we all clandestinely remove from our nasal cavities when we think Mom isn’t looking.

Let’s see…
When we ‘boogie’ hard are we more likely to produce boogers?
Did the Bugi pirates let snots drip to appear more horrifying?
Or maybe the Bulgarian heretics used to wipe their boogers on bible pages?
Are boogers a sign of 2dy syphilis?
Or will the devil get you if you pick your nose?

The relationship is obvious, but the connection evasive.

So why do we call snots boogers?

Booger , meaning nasal mucous is recorded first in print in 1891. I can’t give you a satisfying connection, but my Random House Historical Dictionary of American Slang, edited by a very smart Jonathan Lighter, says

“probably fr. bogey, influenced by bugger.”