Tor for Windows lacks eventlog support
Tor for Windows does not support Windows' native system event logging facility "eventlog". Syslog is unsupported on Windows so an enhancement of Tor for Windows is necessary.
Administrators of Tor relays on Windows have a hard time of keeping track of Tor's events. This enhancement should ease this problem.
Proposed changes/additions
/etc/torrc
or %APPDATA%\tor\torrc
- The
Log
configuration option's valuesyslog
should enable logging to eventlog and be synonymous with the new valueeventlog
on Windows systems. - A new
Log
configuration option valueeventlog
should be added. SettingLog
toeventlog
should enable logging to eventlog on Windows and be synonymous on other operating systems with thesyslog
value. - Eventlog supports only four relevant event types for this matter:
EVENTLOG_SUCCESS
,EVENTLOG_ERROR_TYPE
,EVENTLOG_INFORMATION_TYPE
, andEVENTLOG_WARNING_TYPE
. WhileEVENTLOG_SUCCESS
usually maps toEVENTLOG_INFORMATION_TYPE
leaving effectively three event types. These event types have to correspond to syslog's priorities/severities. Proposed corresponding:-
debug
,info
, andnotice
correspond toEVENTLOG_INFORMATION_TYPE
-
warn
corresponds toEVENTLOG_WARNING_TYPE
-
err
corresponds toEVENTLOG_ERROR_TYPE
Verbosity should remain unaffected of priority/severity to event type correspondings, e.g.notice
should not produceinfo
ordebug
eventlog reports although they all correspond to the same event typeEVENTLOG_INFORMATION_TYPE
.
-
Installing Tor as a service
- When installing Tor as service with "
tor.exe --service install
" tor should create an event source in the registry for eventlog. - When removing the Tor service with "
tor.exe --service remove
" the previously created event source during service installation should be removed from registry.
NOTE: Generally speaking, this Tor installing as a service feature should be revised because by convention it is an uncommon practice on Windows for tools to provide such a feature. Service installation functionality is provided by the sc.exe
external command and the Windows Installer (and the PowerShell lately). The preferred way for software vendors to install services is via the Windows Installer during application setup.
Alternatives
Use a cross-platform logging library with good support for Windows.
Trac:
Username: GITNE