A file system has crash consistency when, whatever the moment the machine stops, the disk afterwards holds a consistent state: every block in use is marked in the bitmap and belongs to one file, every allocated inode is in a directory. Journaling achieves it by writing the blocks an operation will change first to a journal, then a commit record, and only then the blocks in place; after a crash, the committed operations are copied again from the journal. That replay is idempotent: replaying once or several times leaves the same state.
log.txt: three blocks logged, the commit, three blocks written in place, the journal cleared. A crash before the commit loses the operation whole; after it, the replay at the next mount writes the three blocks again, whether or not they had already reached their place.