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 ?

  • 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 '17 at 22:25
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

  • I did consider this option, but it won't go /var/log directory because Tor is not run as root. – Nine Players Jun 14 '17 at 15:32
  • You could always change the permission on the directory... – cacahuatl Jun 14 '17 at 21:37
  • I think rare people like to change the permission of the system directory /var/log. There is also the security concern. – Nine Players Jun 15 '17 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 '17 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 ? – Nine Players Jun 19 '17 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.