# Moving from Papertrail

Papertrail tells senders apart by the port they send to. Tailcove's syslog server uses one port for everyone and
reads your source's **ingest token** from the message's structured data instead, so the change is the destination
plus one field. Everything about [syslog in Tailcove](https://tailcove.dev/docs/sending-logs/syslog) applies.

## rsyslog

Papertrail's setup ends in a line like `*.* @@logsN.papertrailapp.com:12345`. Keep it while you compare, and add a
second destination with a template that carries the token:

```
template(name="TailcoveFormat" type="string"
  string="<%PRI%>1 %TIMESTAMP:::date-rfc3339% %HOSTNAME% %APP-NAME% %PROCID% - [tailcove@41058 token=\"YOUR_INGEST_TOKEN\"] %msg%\n")

action(type="omfwd" target="ingest.tailcove.dev" port="6514" protocol="tcp"
       StreamDriver="gtls" StreamDriverMode="1" StreamDriverAuthMode="x509/name"
       StreamDriverPermittedPeers="ingest.tailcove.dev" template="TailcoveFormat")
```

Restart rsyslog and send a test with `logger "hello from rsyslog"`.

## remote_syslog2 and log files

`remote_syslog2` can't add structured data. The [Tailcove agent](https://tailcove.dev/docs/sending-logs/agent) follows the same files,
keeps its place across restarts and sends over HTTPS, so it replaces `remote_syslog2` rather than sitting behind it.

## Apps that log to Papertrail directly

Libraries that send syslog to Papertrail (winston-papertrail, the Ruby and Python syslog handlers) are easiest to
replace with Tailcove's own client for that language: [Node.js](https://tailcove.dev/docs/sending-logs/node),
[Python](https://tailcove.dev/docs/sending-logs/python) or [Laravel](https://tailcove.dev/docs/sending-logs/laravel-package). They batch over HTTPS and
mask secrets before a line leaves the process.

## Searches and alerts

Papertrail searches are mostly words and phrases, which work the same here. Its `program:` and `host:` filters are
`app_name:` and `host:` in Tailcove. Recreate saved-search alerts as [alerts](https://tailcove.dev/docs/alerts) on the source.
