[tor-relays] More than one instance with Debian Jessie

nusenu nusenu at openmailbox.org
Mon Jul 4 19:09:00 UTC 2016


> Still open:
> 
> How to best separate the tor log files from both instances?

You can either
1) configure tor to log to specific log files (I wouldn't take that path
since handling filesystem permissions properly for every instance is
just messy [logrotate...]) or
2) you stick with the default configuration (all tor instances send
their logs to syslog) and you tell syslog to create per-instance logfiles.
3) or keep them in a common file and use grep to look for the specific
relevant instance.

On Debian tor instances tag their log entries with "Tor-<instancename>"
by default. Something not available in vanilla tor 0.2.7.x (but will be
in 0.2.8.x).

With that in mind you can go and tell syslog what to do:

:syslogtag, startswith, "Tor-tor2["   /var/log/tor/tor2.log

Note:
The actual tag looks like Tor-tor2[1555]
where 1555 is the process ID (PID), that is the reason you can*not*
simply do
:syslog, isequal, "Tor-tor2" /var/log/tor/tor2.log

Note2:
That instance specific log file will "loose" the first ~10 log entries
since they are not tagged.

https://www.torproject.org/docs/tor-manual-dev.html.en:
> SyslogIdentityTag tag
> 
> When logging to syslog, adds a tag to the syslog identity such that
> log entries are marked with "Tor-tag". (Default: none)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.torproject.org/pipermail/tor-relays/attachments/20160704/b44efcf7/attachment.sig>


More information about the tor-relays mailing list