[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



> 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)

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
tor-relays mailing list
tor-relays@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-relays