How to define the size of Tor log files?

Hello,
The / server directory was filled and when I checked I found that Tor did it:

/var/log/tor# du -sh *
2.9M	debug.log
14G    	debug.log.1
4.0K	notices.log
8.0K	notices.log.1

As you can see, the debug.log.1 file size is 14G. How can I define a log rotation for Tor?

Thank you.

unless you are debugging tor, you shouldn’t log things more verbose than notice. It’s probably not useful to you, can contain sensitive information about what you were doing (in case someone manages to get access to your logs) and is, well, a lot more verbose.

Log rotation isn’t handled by tor. You should use something like logrotate, and configure it to send SIGHUP to tor when tor needs to start writing into a new file. Or you can log to syslog or journald.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.