Can i exclude certain Tor log entries being recorded to syslog?

I would like to exclude lines:

Warning! You’ve just connected to a v2 onion address. These addresses are deprecated for security reasons, and are no longer supported in Tor. Please encourage the site operator to upgrade. For more information see Onion Service version 2 deprecation timeline | Tor Blog

from being added to the log

My current policy in /etc/tor/torrc:
Log notice syslog

Possibly can change notice to err to disable all warnings but that may not be good idea.

I was checking if i can prevent sysl0g to record lines matching phrase [EX] How to filter two or more specific messages from being written to the syslog file - Juniper Networks but not found/not understand.

1 Like

Since tor#40474 was closed, this message should only appear once during the lifetime of your Tor process. Maybe that is enough to solve this issue?

We don’t have a mechanism for disabling individual log messages. Filtering is definitely a task for your system logging service.

You can tune which log domains gets sent to your system logger from torrc, which in your case would require you to disable all protocol warnings, which I don’t think is a good idea.

I was checking that gitlab issue, but unable to find out from which Tor version it should be fixed.
I have upgraded from 2 to 1
restart tor, but still seeing tens of “Tried to connect to a v2 onion address, but this version of Tor no longer supports them.” in one minute.

$ sudo downgrade tor --ala-only

Available packages (community):

1)  tor  1  remote
2)  tor  1  remote
3)  tor  2  remote
4)  tor  1  remote
5)  tor  2  remote
6)  tor  1  remote
7)  tor  1  remote
8)  tor  1  remote
9)  tor  1  remote
  1. tor 2 remote
    1. tor 1 remote
    2. tor 1 remote
    3. tor 2 remote
    4. tor 3 remote
    1. tor 4 remote
    1. tor 1 remote
    2. tor 1 remote
    1. tor 1 remote
    1. tor 1 remote
    1. tor 2 remote
    2. tor 1 remote
    1. tor 1 remote
    1. tor 1 remote
    2. tor 1 remote
    3. tor 1 remote
    4. tor 1 remote

select a package by number:

In general, one good way to answer this kind of question is to look at the ReleaseNotes in the tor git:
and search down for references to the gitlab ticket number (40474).

In this case there’s a stanza about it in and in – so it should be fixed in those versions of those trees and later for each tree.

(There is also a ChangeLog file in git, which specifies every change in alpha and dev releases too, if you want to go spelunking to learn exactly which dev releases have the fix.)

Hope that helps!