Added a maximum to the number of log messages that can be displayed.