We often colloquially use the phrase so long to say goodbye. For eg. So long, we'll see you next week or He said so long and left.
What is the origin of this phase? Rather, how did it come into being? I would also like to know the circumstances under which its usage would be deemed appropriate.
EDIT: Is this phrase some sort of corruption of any phrase in some other language(looking at the answers) or it has some meaning to it in English Language as well?