When an application crashes, it is programmed to write the error message into a log file. In Windows, it is centralized and works through even viewers. These log files can include messages as programmed by the developer.