Is it legal to store/log mistyped passwords?

How many of you have seen this happen in a log file or DB?