linux – How to keep the output of the service script clogged with "messages"

I have a service on Centos7 that runs a script in /usr/local/sbin/ and checks the ping rates every 10 seconds. The output of this ends in / var / log / messages and makes the file huge. The output is already sent in its own log file. How can I keep the ping results of the script / service outside the "messages" file?