---
title: "How to enable trapper Collector logging"
description: "Trapper Collector logging can flood /var/log/messages with SNMP trap data lines. Create a custom collector service with modified command line arguments to redirect logs and disable the original service."
url: "https://docs.itrsgroup.com/docs/faq/op5/360020250893-op5-monitor-how-to-enable-trapper-collector-logging/index.html"
---
In case the collector daemon is filling up your /var/log/messages with an endless number of lines containing SNMP trap data, you can easily fix this by creating a custom collector service without Syslog options enabled.

The resolution is to change some of the command line arguments passed to the collector daemon. Instead of `-Lsd` we want to use *-Lf /some/place/for/logs/trapper-collector.log.*

Some things to keep in mind:

- The new log file is not log rotated by default. If you need rotation, add a new log rotation setting file into the /etc/logrotation.d/ directory.
- Disable the original service and enable the new one instead.
- This will not stop Trapper's *processor* daemon from logging to /var/log/messages. But this change will only affect *collector*.

The following instructions are for EL7:

```
cd /usr/lib/systemd/system
cp collector.service collector-nosyslog.service
sed -i 's/.conf\ -A\ -Lsd\ -f/.conf\ -A -Lf\ \/path\/to\/log\/file/g' collector-nosyslog.service # Replace placeholder path with real path
systemctl disable --now collector.service && systemctl enable --now collector-nosyslog.service
```


