versaplexd-svc: add description field, logfile, and catch exceptions.
commit860aae59ccabb1d7dbdc648e0fb2bf60c8714d17
authorAvery Pennarun <apenwarr@gmail.com>
Tue, 2 Dec 2008 21:17:49 +0000 (2 16:17 -0500)
committerAvery Pennarun <apenwarr@gmail.com>
Tue, 2 Dec 2008 21:17:49 +0000 (2 16:17 -0500)
tree8e0943fcb65c4e9cd5e3900728e94224f040044b
parent224d077044b41229b62c7954c857c1bd5a1d648c
versaplexd-svc: add description field, logfile, and catch exceptions.

We weren't setting the "Description" field in the Services control panel.

Also, we should search for versaplexd.ini in the same directory as the dll,
which is apparently *not* the default directory the service runs from (on
Windows).

Use WvLog's new log-to-file support to write to a file called versaplex.log,
also in the same directory as the exe.  Writing to stdout, of course, makes
little sense in a Windows service.

We also do a little work toward catching exceptions.  We log exceptions that
occur in Versaplex.Go instead of letting them leak all the way to the top
level, where they would be unnecessarily scary (and you don't get to read
the actual exception message, sigh).

We now don't let you install the Windows service at all if we can't find the
config file.
versaplexd/versaplexd-svc.cs