1

I'm running Tor as a daemon and enabled the syslog. The Tor daemon is running well as a socks proxy server and sending all logs to /var/log/messages.

But I want to make Tor to write the log through syslog to one of the local[0-7] syslog facility, then I can clearly read the Tor specific logs in a single log file, for example /var/log/torlog.

It seems there is no way to assign the syslog facility. Does anyone know how to assign syslog facility ?

1
  • If you want it to log to a file, surely you'd want to use the file log facility, rather than syslog?
    – cacahuatl
    Jun 11, 2017 at 22:25

2 Answers 2

0

You want to use the file option for Log to make Tor log to a specific file.

For example by setting the Log line in your torrc to this:

Log info file /var/log/torlog

8
  • I did consider this option, but it won't go /var/log directory because Tor is not run as root. Jun 14, 2017 at 15:32
  • You could always change the permission on the directory...
    – cacahuatl
    Jun 14, 2017 at 21:37
  • I think rare people like to change the permission of the system directory /var/log. There is also the security concern. Jun 15, 2017 at 14:00
  • That is how the Tor projects own debian package handles it. I don't think it's much of a security concern if done properly.
    – cacahuatl
    Jun 15, 2017 at 16:05
  • I agree. But I don't know how to change the permission of /var/log properly without impact the security. Maybe it needs a specific directory instead of /var/log for this workaround to work. Currently, I don't want a specific directory. How about Tor add a function to assign the syslog facility ? Jun 19, 2017 at 4:48
0

There is no way to assign the syslog facility. A not working work around suggests to use Log info file /var/log/torlog , however this work around is really not working because Tor isn't run by root or privileged user.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .