I gave an answer to this on AskUbuntu.com

https://askubuntu.com/questions/1324364/how-to-stop-kern-log-and-syslog-from-growing-too-much/1324384

Just replace the "contain" string with something...