0

Log message limit capping

The client side logging needs a reporting cap on messages.

There's no reason at all to report the same error message 10,000 times when the first 200 are quite sufficient.

This could be implemented with a Dictionary like structure, just store the first oh 25 relevant chars of the error message as the key and the mapped item is the current count of them messages. Once the cap is hit it reports one more time about the message indicating too many errors. 

Compilers typically do something similar, like if there's a missing semicolon and can cause 100s of errors after that, but they cap the count of what is displayed so it doesn't get ridiculous.

My log directory is already nearly half a GB in a month. Many duplicate reported errors per file.

 

 

3 comments

Please sign in to leave a comment.