The memory available for logging is not infinite, so the micro:bit will stop logging when the log file is full. If you are using a MakeCode program a 928 error will be shown on the display when the log is full.
To avoid the error, you can also tell your program what to do when the log is full. For example, you could delete the log data and start again or show something else on the LED screen.
The 'on log full' block lets you choose what to do when the log is full.