Idiom:

Figure of speech.     Sleeping like log – fast asleep – sleeping soundly = asleep for a long time

Figurative speech = Rhetorical