[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #10045 [Tor]: Tor for Windows lacks eventlog support
#10045: Tor for Windows lacks eventlog support
-------------------------------------------------+-------------------------
Reporter: GITNE | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: Tor | Version:
Keywords: tor, syslog, eventlog, log, | Actual Points:
logging, Windows | Points:
Parent ID: |
-------------------------------------------------+-------------------------
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 value {{{syslog}}} should enable
logging to eventlog and be synonymous with the new value {{{eventlog}}} on
Windows systems.
* A new {{{Log}}} configuration option value {{{eventlog}}} should be
added. Setting {{{Log}}} to {{{eventlog}}} should enable logging to
eventlog on Windows and be synonymous on other operating systems with the
{{{syslog}}} value.
* Eventlog supports only four relevant event types for this matter:
{{{EVENTLOG_SUCCESS}}}, {{{EVENTLOG_ERROR_TYPE}}},
{{{EVENTLOG_INFORMATION_TYPE}}}, and {{{EVENTLOG_WARNING_TYPE}}}. While
{{{EVENTLOG_SUCCESS}}} usually maps to {{{EVENTLOG_INFORMATION_TYPE}}}
leaving effectively three event types. These event types have to
correspond to syslog's priorities/severities.[[BR]]Proposed corresponding:
* {{{debug}}}, {{{info}}}, and {{{notice}}} correspond to
{{{EVENTLOG_INFORMATION_TYPE}}}
* {{{warn}}} corresponds to {{{EVENTLOG_WARNING_TYPE}}}
* {{{err}}} corresponds to {{{EVENTLOG_ERROR_TYPE}}}
Verbosity should remain unaffected of priority/severity to event type
correspondings, e.g. {{{notice}}} should not produce {{{info}}} or
{{{debug}}} eventlog reports although they all correspond to the same
event type {{{EVENTLOG_INFORMATION_TYPE}}}.
== Installing Tor as a service ==
* When installing Tor as service with "{{{tor.exe --service install}}}"
tor should create an [http://msdn.microsoft.com/en-
us/library/aa363661%28v=vs.85%29.aspx 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.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/10045>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs